pass data through router angular 1

pass data through router angular

this.router.navigate(["heroes"], {some-data: "othrData"})

Here is what the above code is Doing:
1. The routerLink directive is bound to a string that tells the router where to navigate when the user clicks the link.
2. The routerLinkActive directive adds the active CSS class to the HTML element when the link’s route becomes active.
3. The routerLinkActiveOptions directive is used to set the exact value of the routerLinkActive class.

Similar Posts