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
0
votes
1 answer

Angular requires micro frontend's polyfills.js as well as vendor.js with main.js to load the element. And only loads the 1st declared main.js

I have build 2 micro apps with angular elements. Built the micro apps with ngx-built-blus with --output-hashing non --single-bundle true. Served them in 2 different ports in localhost. I'm currently facing the following issue. Shell app is a regular…
0
votes
1 answer

Display data in Angular Elements

I'm using Angular elements to show a angular page inside an existing Spring-Boot project. I have an inquire button with which I load data from backend in the component typescript file and then display it on the screen. I'm using two different…
Harshit Khanna
  • 93
  • 1
  • 1
  • 6
0
votes
0 answers

Call a event on window.close event

I have a code to create a new user on a opened window. So I want to trigger a even on window.close. Can anyone please help me with this. My code goes like this this.authService.postWithoutEncript('callSiteRegUrl', this.sitesData.value, '',…
0
votes
1 answer

Use Angular applications in another Angular project

I have two Angular applications. Each have one main Module and some components. I want to have a third Angular project, that uses them. How can I do that? I think I should somehow package each application and then install it in the new Angular…
EDalet
  • 23
  • 5
0
votes
1 answer

How do I include angular app in external html file

I'm using Angular 7 and I want to insert the angular app as a widget in another external html file. I know there are angular elements to create a custom element and insert it but having many browser compatibility issues in that. I tried including…
Manoj kumar
  • 227
  • 6
  • 19
0
votes
1 answer

Import 2 Angular projects in another javascript project

I have 2 separated Angular projects. For each of them, I run the following CLI command: ng build --prod --output-hashing=none It creates the following files for each project: runtime.js polyfills.js main.js Now I want to import the projects into…
EDalet
  • 23
  • 5
0
votes
1 answer

Call a parent service get method from child custom element

I have a created a custom web component using angular elements which needs to call a method in main application service.ts. custom element @Component({ templateUrl: './sample.component.html', styleUrls: ['./sample.component.css'] }) …
0
votes
1 answer

ERROR TypeError: i.createShadowRoot is not a function on Angular Web Component?

I'm attempting a basic Angular Web Component. I created a github repository that shows the approach here: https://github.com/fireflysemantics/fs-gist This is the…
Ole
  • 41,793
  • 59
  • 191
  • 359
0
votes
1 answer

Angular elements and Internationalization (i18n)

I am working in a project that has Angular elements(or Angular web components) and I need do the Internationalization (i18n) in Spanish language following the Angular rules. my angular.json is: { "$schema":…
beanic
  • 539
  • 6
  • 22
0
votes
0 answers

Better way to get the event data in Angular Elements Custom Events

In angular elements, as per the docs and this SO question says emits a custom event whenever we emit a value using @output event emitter. But it's actually cumbersome to handle in the real usage side. Is there any other way to get the real value…
0
votes
2 answers

Using jQuery in Internet Explorer to Pierce Shadow DOM

I am trying to use jQuery inside an Angular Elements web component with ShadowDom encapsulation and running into problems with internet explorer, specifically IE11. An error is triggered when resolving to the shadowRoot and then using the jQuery…
0
votes
1 answer

How to mock Angular external Javascript object

I have an angular application which only purpose is to build @angular/elements (no index.html, no app.component, etc.). Those elements are used in an .NET Mvc app which provides two kind of things I'm trying to mock in my unit tests: 1 - External…
0
votes
0 answers

Angular Elements Web Component error when binding data

I am playing around the Angular Elements to see if I can create a web components using existing Angular components so I can share the component between different frameworks. I have created a simple web component using Angular Elements that should…
AlexanderM
  • 1,613
  • 4
  • 21
  • 35
0
votes
0 answers

Angular 8 Custom element on IE11/Edge gives "createdCallback" error

I have created an Angular Element application which is a Chat widget. Everything works fine on Chrome, Firefox, Safari, Opera, but I have a problem with launching my widget on IE and Edge. Once I run it locally, everything works fine even on IE and…
whiteBear22
  • 377
  • 2
  • 8
  • 21
0
votes
1 answer

Angular Element v/s Customizing the Selector in app.component.ts

Trying to understand the concept of Angular Element. If I just change the selector defined in the app.component.ts from app-root to hello-world (and combine the generated js files into one), I can use that as a custom tag "hello-world" in my html.…
Vikas
  • 626
  • 1
  • 10
  • 22