Questions tagged [angular-elements]

Angular Elements compiles Angular Components into framework-agnostic Web Components.

Angular Elements compiles Angular Components into regular Web Components, which can be used outside of Angular, in any framework, such as React, or just in regular HTML.

301 questions
8
votes
3 answers

angular 6 element boolean input parameter

I'm building out an angular element and passing some input params to it. I can pass some string input params just fine (ikrId and environment work perfectly) but struggling to pass a boolean value to the showTitle input property through an angular…
cobolstinks
  • 6,801
  • 16
  • 68
  • 97
8
votes
1 answer

How to debug angular-elements?

I built a project using angular-elements and managed to successfully embed a component into another application. What I would like to do now is be able to debug the original component from the application it is included in. All the logic for the…
mtoczek
  • 81
  • 1
  • 3
8
votes
1 answer

How to create Angular custom elements with Angular universal: SSR

I am trying to create an Angular app with Angular Universal: SSR and Custom Elements. I downloaded the sample code available in Angular Universal: SSR and added the following lines of code to for Custom Elements in AppModule's constructor const ele…
j4rey
  • 2,582
  • 20
  • 34
8
votes
1 answer

Can I have angular library that emits Angular elements in single js file?

I'm starting to get into the angular 6 bits, and am very interested in Angular Elements as well as the new library projects. I have an upcoming project that will probably need both these new features. I have the need to create custom UI components…
cobolstinks
  • 6,801
  • 16
  • 68
  • 97
7
votes
3 answers

How do you create web components with customizable templates using Angular Elements?

I would like to create a library of web components using Angular Elements that have default templates but allow developers to override the output. For example, consider a search-results component. I might have a default template that looks like…
JKasper11
  • 772
  • 1
  • 7
  • 21
7
votes
2 answers

Angular Elements Output not working in IE11

I try to get Angular Elements working in IE11. My custom element (simple button) is already displayed and the input binding is working as expected, but the output binding doesn't. A click on my custom element button in IE 11 results in the…
jowey
  • 7,581
  • 6
  • 27
  • 46
7
votes
7 answers

Angular Elements: @Input decorator not working with variables

I have several separated web components, made with angular elements, that I import in a main one, which has a router and is the base application. Routes are pretty simple: import { Component } from '@angular/core'; import { Router } from…
Romain
  • 3,586
  • 7
  • 31
  • 52
6
votes
3 answers

Listen to Angular web component EventEmitter into javascript

I have a created a small web component with the help of this article using angular element which includes @Input and @Output. I am able to pass data to @Input property but listening to the @Output event is making me crazy as I am unable to figure…
6
votes
3 answers

Recommended approach to using Angular Elements with Internet Explorer 11

Looking for guidance on how to use Angular Elements that will work across other browsers especially with Internet Explore 11. So far following the recommended convention of using ngDoBootstrap to define the custom element (Angular Element). It only…
Chief
  • 854
  • 12
  • 27
6
votes
1 answer

How can images be used in an Angular Element

I am creating an angular element which is supposed to be embedded on multiple external sites. The embedding process will ofc just be a reference to the compiled script and a DOM element representing the element:
6
votes
1 answer

Angular elements as native form control in reactive form

I'm trying to export a form control as an Angular Element (web component) and have it work as a native input element so that it could be used with angular reactive forms or similar libraries that work with native html inputs. The bellow code works…
Chris Linden
  • 246
  • 1
  • 8
6
votes
2 answers

Shared data between Angular Elements

I'm look into Angular Elements and thinking of generate our Angular Components into Angular Elements to make it possible to be used outside Angular applications. Let's say I got a Angular 4 app which imports two different Angular Elements (built in…
bjorkblom
  • 1,849
  • 3
  • 21
  • 31
6
votes
3 answers

Integrated web component uses wrong base-href in Angular 6

I just created my first web-component using Angular 6. Everything worked fine, until I tried to integrate the web component into an existing application: Application that integrates web component (https://www.example.com):
nimrod
  • 5,595
  • 29
  • 85
  • 149
5
votes
1 answer

Bundling Angular Element into a Single File

I am building a Web Component with Angular Element (version 13) and I have a question regarding bundling. Would it be possible to the build the Web Component in a way that all of the js bundles (main.js, runtime.js and polyfills.js) and the css and…
5
votes
1 answer

Angular Elements - Are they a lib or an app in NRWL/NX?

Trying to build a suite of angular elements (web components) in an NX workspace. I tried first as a lib, but couldn't 'build'. I retried as an app - but I cannot create a storybook for it since its not a lib. What's the path to peace?
ed4becky
  • 1,488
  • 1
  • 17
  • 54
1
2
3
20 21