I have a property in a top level Component that is used data from a HTTP source like so (this is in a file called app.ts):
import {UserData} fro
There are different way:
global service
service shared by parent and injected to the child
providers or viewProviders in the parent instead of boostrap(...) and only available to children of parent.parent injected to the child and accessed directly by the child
export class Profile implements OnInit {
constructor(@Host() parent: App) {
parent.userStatus ...
}
export class Profile implements OnInit {
@Input() userStatus:UserStatus;
...
}