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
1
vote
1 answer

Angular Elements: Slots appearing even when empty

I'm using Angular Elements for creating a UI kit. I'm using slots for content projection. The problem is whenever i'm using slots, and when the slots content is empty - the slot's dom element is still there. Here's the code of the UI component i'm…
Kavinda Jayakody
  • 705
  • 1
  • 13
  • 25
1
vote
0 answers

No value accessor for form control with name: 'email'

I have tried a lot of solutions from Stack Overflow, but none of the solutions worked. I am using ControlValueAccessor and creating a reusable WebComponent so that I can access the component or element in other project. For this, I created a JS file…
Abdul Basit
  • 1,352
  • 1
  • 10
  • 18
1
vote
2 answers

Angular 7: Exporting Angular elements from an Angular library

I'm trying to export angular custom elements defined in a library L - through the constructor of the AppModule of the library L(customElements.define('my-custom-element', myComponent)). On importing the library L, my angular application throws…
Sanjay Verma
  • 1,390
  • 22
  • 40
1
vote
2 answers

Use customElements library made with @angular/elements within an angular application prod issue because of optimization

I am facing a weird issue and wonder if some of you faced the same issue as well. We are actually working on a custom elements library made with @angular7 and @angular/elements using this tutorial:…
ChainList
  • 1,198
  • 7
  • 28
1
vote
1 answer

Using Angular6 application inside VueJs application

We have Angular application (version 6.1.5), which makes HTTP request to the Restfull API. We have used modular approach in Angular App. There is app level routing configurations and each modules have their own routing configuration. This set up is…
Sameer K
  • 799
  • 1
  • 7
  • 26
1
vote
0 answers

How to manage "angular element" routes inside vue component?

I'm trying to integrate an angular component inside vue making using of "Angular Elements"(Web Component). I have been successful in displaying the component in the vue but unable to get the routes working when the vue application is reloaded. My…
Sanju
  • 1,478
  • 2
  • 20
  • 41
1
vote
0 answers

ng.probe overrides by angular-elements

I have chrome extension which injects angular-elements to the page. Extension is supposed to be run on the pages with the Angular application. There are two different issues I've faced with: building angular-elements without optimization:true flag…
1
vote
1 answer

Reduce size of Angular Element output with peerDependencies

We are trying to build an Angular Element (with Angular 7) that should be used in an AngularJS project. The output .js file is 5 MB large ... to much. An analysis with webpack-bundle-analyzer shows that most space is used by dependencies that are…
1
vote
0 answers

How to get values from angular custom elements

Im having some angular custom elements. I want to create instance of those and get their model values in its parent component. The input, output methods not helping. Could you please suggest me a way. Thanks in advance. Create Custom ELement const…
Stark Buttowski
  • 1,799
  • 2
  • 10
  • 21
1
vote
1 answer

Angular 7.3.5 elements on IE 11 gives: Object doesn't support property or method 'from'... on Firefox: blank page

Scenario Created 2 different Angular elements (via 2 separate projects) First one is exactly as per this tutorial - one change which was not part of the article was that i had to do 'npm i document-register-element@1.8.1' in order to get the demo…
Akber Iqbal
  • 14,487
  • 12
  • 48
  • 70
1
vote
1 answer

Complex Angular element (web component) or Angular Library

I need to code a module that would be reused for our different apps, and it requires to use routing, forms, tabs... Does it make sense to make a web component using Angular elements or it would be a better idea to create a library for that? All of…
Pizzicato
  • 1,473
  • 1
  • 16
  • 32
1
vote
1 answer

Where to declare HTMLElementTagNameMap to get typings for Angular Elements?

I'd like to get accurate typings for my Angular elements, but where do I place the HTMLElementTagNameMap-interface, so that is is recognized correctly? Casting the type on every occurrence works: const newCustomElement = …
jowey
  • 7,581
  • 6
  • 27
  • 46
1
vote
2 answers

Angular Elements: include once tha angular core

Angular Elements are Angular components packaged as custom elements. Each Angular Elements ship the angular core. If in a standard html page i include 5 Angular Elements components, this page download 5 times the angular core. There is a way for…
ar099968
  • 6,963
  • 12
  • 64
  • 127
1
vote
2 answers

Mat-dialog not displaying properly when used in custom elements

I am trying to use mat-dialog in my angular custom element. I works fine when in the angular app but can't seem to bundle the material theme while building to custom element. When i inspect the code outside of angular app, no style is attached to…
cozmik05
  • 477
  • 5
  • 13
1
vote
0 answers

Using Angular Elements to build micro-frontends

I've been using Angular Elements to build micro-frontends and when each micro-frontends is a completely isolated micro frontend everything works correctly.