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
I made a generic component where I need a reference to the parent using it. Here's what I came up with:
In my component I made an @Input :
@Input()
parent: any;
Then In the parent using this component:
In the super component I can use any public thing coming from the parent:
Attributes:
parent.anyAttribute
Functions :
parent[myFunction](anyParameter)
and of course private stuff won't be accessible.