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
2
votes
0 answers

angular-element error when component used inside angular app and as custom element out side of angular

I am trying to convet my angular component so that it will run in both angular and non angular environment. I have added my elements as export and added them to custom element list and entry component list so that they will be exported as custom…
Aniruddha Das
  • 20,520
  • 23
  • 96
  • 132
1
vote
0 answers

Which is better for micro frontend in Angular besides module federation, using IFrames or Angular elements?

We are looking to separate a feature in our existing main Angular application. We are considering using IFrames or web components using Angular elements. Module federation is currently not an option as it will take significantly more time to convert…
James Buns
  • 47
  • 8
1
vote
0 answers

How to build SPFX Web Part with Angular CLI Elements

When using gulp serve - Getting errors like You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. I am trying to…
1
vote
1 answer

Giving error in chrome like cannot read properties of undefined in Angular

Created two web components: web-comp-1, web-comp-2 When I tried to add in HTML page, I am getting console error like below Uncaught TypeError: Cannot read properties of undefined (reading 'create') at new m. (web-comp-1.js:3:2706) at new t…
Tony
  • 141
  • 4
  • 21
1
vote
2 answers

Package Angular into Library

I've searched around and haven't quite figured out how to do this yet. I have an Angular library I've created that contains custom components. This is being exported as Web Components so other applications outside of Angular can use them. However,…
Andrew
  • 718
  • 1
  • 7
  • 25
1
vote
1 answer

Unit tests of Angular Elements (registered with the CustomElementRegistry as a HTML Custom Element) pass individually but fail when run together

I'm using Angular Elements https://angular.io/guide/elements which allows me to create an angular component, define a tag name, and register it as a HTML Custom Element in the CustomElementRegistry…
1
vote
1 answer

NullInjectorError while creating simple custom element (@angular/elements). without any providers, services

Lately I have been learning Angular and @angular/elements. I was curious about creating custom element that i can use in any html. My goal is to create simple custom element just with 1 component without providers, services (my first custom…
1
vote
0 answers

Reuse Angular Application in Container Application

I have a more fundamental question in regards of Angular Applications. I built an small Application using Angular and Spring Boot. The application is a small reservation app where the user can add, delete and see all existing reservation on an…
1
vote
0 answers

Using Angular Elements MFE web component in React shell app

I'm trying to build a micro-frontend project with React shell and Angular micro-frontend application. I don't have any idea how to import remoteEntry.js into React component and use the web component generated by Angular Elements. // const Catalog =…
1
vote
0 answers

Angular elements web component creating memory leak

I created two pages first one is listing & the second one is details page with mat-tabs. One of the tab contains web component(ViewComponent) created using angular/elements. Following is the html for the details page. <-- other tabs…
Sumit M
  • 620
  • 5
  • 12
1
vote
0 answers

Angular 8 Custom Elements not working in IE11 when invoked from angular JS

We are seeing the below error in the console when we launch the angular js application in IE11 browser which tries to invoke the angular 8 elements from it. It works perfectly in chrome and other browsers. Also, when we try to invoke the Angular…
1
vote
0 answers

Export and use a Directive (not a component) in Angular Elements ? (Angular 12)

Well I've been stumped on this for a couple days already and I'm lost. Sometimes trying to do everything as a component doesn't work out, so I need directives. The issue I'm facing is that when I try to export a Directive to be used in my frontend…
DARKGuy
  • 843
  • 1
  • 12
  • 34
1
vote
0 answers

How to call a module defined in Angular Element in the secondary project?

In my Angular project, I used the http interceptor module as a web component by Angular Element, and finally I built the project and used it as a script in another Angular project. But the http interceptor structure I defined in the web component…
1
vote
0 answers

Angular Custom element with Material styles are NOT applying when using it in different Angular application

I have created angular custom elements by following the blog tutorial . link is here I bundled the custom elements into single js and css files and used that js, css files in different angular application imported them in angular json file like the…
Roster
  • 1,764
  • 6
  • 17
  • 36
1
vote
0 answers

spfx-angular-elements project working correctly on workbench but not working on sharepoint page

I have created a demo with reference to the below link, https://gonadn.medium.com/spfx-with-angular-element-crud-operations-using-pnpjs-5a8a18ed6e43 It is working correctly in the workbench. Kindly refer to the below image, It is not working…