O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Router Outlet and Router Links

When the user passes '/about' in the address bar of the browser appending to the end of the application URL, the router will match the request with the 'about' and initiate the AboutComponent to handle rendering the view for about. We need to somehow inform the router where to display this about view. This can be achieved by specifying <router-outlet/>, which is similar to the <ng-view/> tag in AngularJS 1.x to load the templates associated with the corresponding path of the route.

Router links help navigate the route URL via the link specified in the anchor tag by clicking on the router link. A sample router link tag is given here:

<a [routerLink]="['/about']">About</a>

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required