In addition we saw the use of the NsRouterLINK which I briefly mentioned.
In an early slide.
The nsRouterLink is the baby specified in a navigation within our templates.
Wherever we need to specify navigation to end that page.
So for example you will see me using a nsRouterLink
just like we use the RouterLink in Angular application.
So we will specify nsRouterLink and
then specify the link of the page to which you want to navigate.
As in this example, we specify NsRouterLink is equal to /Menu here,
so, meaning that you want to navigate to the Menu page in this case.
This navigation is also supported in code using the router extensions service.
So, the RouterExtensions enables navigation through code.
The RouterExtensions, when you include all input within your
native script component and inject that into your constructor.
It provides you with various matters, like the back back to
previous page navigate, navigatebyUrl and a few more methods.
In particular the back method goes back to the previous router location.
So inside the pageRouterOutlet within the tie components you can
define additional router outlets.
The Angular router outlets if you prefer to in order to
provide Sub navigation inside child components.
So for example if you are coming from the Android world,
you are familiar with fragments and
how fragments enable you to navigate even without moving your activity.
Similar kind of behavior can be leveraged that inside a child component
by using the Angular's router outlet within your templates.
So navigation within the router objects,
if you navigate to another view within that router outlet, you can navigate back.
Still using the router extensions back [INAUDIBLE] but
if you use the backToPreviousPage method that RouterExtensions supports.
Then you're navigating back to the previous page
that is attached to the page router outlet, so.
Note the distinction between the two.
Depending on which kind of navigation you want to implement,
you would use either the back method or the back to previous page method.
Within your quote native script router module also supports
route parameters just like the way the Angular router supports.
So you can define router parameters so for example you can say NG the outer link and
then say slash dishdetail within an array and
then second element of the array could be a.