I've searched everywhere on the internet and I cannot figure out the answer. I was wondering if it was possible to data bind an Angular Element's input AFTER its been turned into a script and brought into plain HTML/JavaScript files. I've tested data binding an Angular Element within an Angular environment and it worked fine. It's only when I bring it out as a script to plain HTML/JavaScript where it stops working. Is it possible to do it and if so can someone please show me an example?
We have our Angular Element called my-element and I want to data bind a boolean value to its input.
public _random: boolean = false;
@Input()
get random(): boolean {
return this._random;
}
set random(value: boolean){
this._random = value;
}
Then in the plain HTML/JavaScript file where we bring the Angular Element in as a script we have
<my-element [random]="true”></my-element>