Its accessible in and after this event:
ngOnInit() { ... here ... }
and as the others already mentioned.. if you are using the [myname]="variable or expression()" syntax, inside the "" need to be a variable or an expression of your component..
If you are using this syntax myname="anyStringHere" you can paste only a string there..