I have a two component. One of them is the main page and other one is a pop-up component. There is a variable in my main page and I want to pass that variable to pop-up. How can I do it without importing the whole main page to pop-up?
I tried to do the method right below but couldn't make it work
constructor(
private service:InvestService,
private investId:MainPageComponent["investId"]) { }
I got the warning below from my IDE but I couldn't make sense of it.
No suitable injection token for parameter 'investId' of class 'MainPageComponent'.
Consider using the @Inject decorator to specify an injection token.
Can you help me out please?