'Angular WebComponent
My question is about WebComponent Angular Standalone. I created one like this:
app.module.ts
constructor(injector: Injector) {
const comp = createCustomElement(AppComponent, { injector });
customElements.define("mawc-bill", comp);
}
app.component.ts
@Input('secretPass')
secretPass: string ="";
but when I try to insert my webComponent in a simple page HTML, my input doesn't work.
<body>
<mawc-bill secretPass="secretPass"></mawc-bill>
</body>
</html>
I try this too:
<mawc-bill [secretPass]="secretPass"></mawc-bill>
<mawc-bill [secretPass]="'secretPass'"></mawc-bill>
<mawc-bill attribut-secretPass="'secretPass'"></mawc-bill>
Does someone have an idea ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
