Routing/Navigation
Embryo is compatible with parameter routing and lazy Loading. There are followings steps:
Last updated
Embryo is compatible with parameter routing and lazy Loading. There are followings steps:
Last updated
Go to src >> app >> and open app.routing.ts file and add routing like this:-
For Reference:
If you want to use this routing in component. then go to src >> app >> and open component.ts file then do the followings:-
a) Add the the routing at top of the file like this:
b) Add in your desire component and add these line of code in your function:- For Example:-
For Reference :-
When the HTML element with RouterLink binding is clicked then the CSS classes bound with RouterLinkActive will be active. These directives are used are follows.
Lazy Loading in Embryo we need to create a routing module and a module for that component.
Go to src >> app >> and open app.routing.ts file and add routing like this:-
2. Inside the products module routing, Go to src >> app >> Products and open Products.routing.ts file and add routing like this:-
For Reference :-
For Reference :-