I need to route to my component and bind data in @Input.
I have a router link and i use it in different places to navigate to my component. And i need to pass different data when i route to my component from different places
I was trying this
this._router.navigate(['MyComponent', {title: 'something' }]);
I don't want to use this way because it will add some params to my URL link
I want it to be something like
< myComponent [data]='data'>
And the catch it in @Input
@Input() data = data; // sorry if this code is wrong, it's just for example
Is there any way i can do this? or there's some other options to work around my situation? How can i route to component and bring some data with me
@Input? If you don't want the data in the URL, you could put it in a service before navigating, and then pull it out of the service.