I have 3 root components that get bootstrapped by the root AppModule.
How do you go about specifying an @Input() parameter to one of those
As far as I know, you can not pass @Input() to a bootstraped component.
But you can use another way to do that - pass the value as an attribute.
index.html :
Loading...
app.component.ts :
@Component({
selector: 'my-app',
templateUrl: 'app.component.html',
styleUrls: ['app.component.css']
})
export class AppComponent {
constructor(private elementRef:ElementRef) {
let myAttribute = this.elementRef.nativeElement.getAttribute('myAttribute');
}
}