10 July 2018
tags: angular angularelements webcomponents frontend

binding inputs to angular elements gave me a surprise.

for example, the below component:

/* import statements */

@Component({ selector : 'my-component', template : '' styles : [] })

export class MyComponent{ @Input() inputString : string = default value }

in an angular application, you'd have:

<my-component [inputString]="'hello world'">

in the exported element would however, look like:

as documented here