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

transform HTML string to Angular Components

let's say we do an API call and get some HTML DOM in a String. The content comes as HTML without angular, so I have first to transform it to Angular where I want and then compile it as angular. Example API response:
...some more html...

a…

0
votes
1 answer

One-way from data source to view target data binding for @angular/elements

I have a project generated with @angular/cli v7.0.3. I've pushed a small demo application here: https://github.com/collinstevens/web-component-sender I have added @angular/elements and the @webcomponents/webcomponentsjs polyfill. I have a basic…
Collin Stevens
  • 737
  • 9
  • 19
0
votes
1 answer

Angular Elements produces HTML all on one line

This is extremely annoying. As many of you probably know, there is a "bug" with browsers, that treat inline-block elements kind of weird. If you place two inline-block elements next to each other, they will have an invisible margin, as you can see…
MortenMoulder
  • 6,138
  • 11
  • 60
  • 116
0
votes
1 answer

How to get the Conten with MatTabChangeEvent

I read a tab menu via a directive and an event. I get the right index and most likely the right element. Now I would like to animate the ElementRef to be able to animate it, but I can not find it. It is not templateRef and not origin. Can somebody…
Helge
  • 79
  • 3
  • 17
0
votes
0 answers

Angular.During ng build --prod get error : Uncaught (in promise): Cannot read property 'call' of undefined

Getting following error when using external angular elements (webcomponents) in my angular application. Uncaught (in promise): TypeError: Cannot read property 'call' of undefined TypeError: Cannot read property 'call' of undefined It occurs only…
Gowthamr.cs
  • 141
  • 2
  • 12
0
votes
0 answers

Angular Elements Script Import vs Element Reference Location

We're building out Angular elements for a project at work and came across something weird, but maybe it's not that weird... The Angular Elements containing script import on the page must come after the element reference (which I guess makes sense,…
cobolstinks
  • 6,801
  • 16
  • 68
  • 97
0
votes
2 answers

Angular Elements : several custom web-components out of a feature-module project-structure possible?

I want to create several custom web-components with angular6 and angular-elements. Right now, i've just got it working if everything is defined inside the app.module.ts directly. But my project consists of several feature-modules with their own…
deelde
  • 1,540
  • 13
  • 23
-1
votes
2 answers

can i build a component which interacts with backend using angular elements?

I'm currently building a quiz app which uses a component to create a widget using which we can embed to a 3rd party website. This widget GETs questions from database(MongoDB) and POSTs the answers to the database, basically it interacts with my…
-1
votes
1 answer

Angular Element - body strangely getting appended at the end

This is strange. Whenever I render my custom element, the body (innerHTML) of the element gets appended at the end. This is my homepage - see 'childbody' is in the body of the s-child element: import { Component } from…
Sanjay Verma
  • 1,390
  • 22
  • 40
-1
votes
1 answer

not receiving Angular Web Component fired event from raw JavaScript addEventListener

I have a simple Angular Web Component that fires an event which is caught just fine when captured from another Angular container component. But when I try to capture the event from JavaScript, I get nothing, even though the component renders fine…
neonguru
  • 759
  • 6
  • 16
-1
votes
1 answer

Cors issue on ngx-translate of externally loaded js in Angular project

First a bit of context: we've got an Angular project (call it "project X") that has its own json translation files (loaded with ngx-translate). This project is then ported as Angular Elements (the whole thing is ported to a single js file, call it…
-1
votes
1 answer

Inject a Provider into an Angular Element (NGRX)

I keep getting the below error in my browser after I compile an Angular element that is using NGRX data: I attempted adding and removing EntityCollectionServiceElementsFactory to the providers in every NgModule in the NGRX data app without any…
-1
votes
2 answers

injecting dynamic html inside the components from index.html in angular 8

I am working on a web app. which has magnolia as CMS. i am still new here but i will explain the scenario. magnolia is providing the index.html which has reference of the components.But for some of those components it also provides some additional…
Vikas Dubey
  • 320
  • 3
  • 5
  • 15
-2
votes
1 answer

Is it possible to add Angular Elements to existing Angular-6/CLI project?

I have an existing Angular 6 project and we would want to build an Angular element as a child of the main app module. Is that possible? I tried adding a new custom component and using createCustomElement to register. However, since it is a child…
Divya Jose
  • 389
  • 1
  • 4
  • 21
-3
votes
1 answer

Angular 8 create custom elements with Ivy

I need to create a custom element (web component) using angular 8 enabling ivy. to used with an anther framework, is there any proper documentation for that?
Jayampathy Wijesena
  • 1,670
  • 1
  • 18
  • 26
1 2 3
20
21