Interview Questions

1. What do you understand about RouterOutlet and RouterLink?

A RouterOutlet is a directive from the router library that acts as a placeholder. It marks the spot in the template where the Router should display the components for that outlet. A router outlet is used as a component.



On the other hand, a RouterLink is a directive on the anchor tags that gives the router control over those elements. Since the navigation paths are fixed, you can assign string values to the router-link directive as below,


<h1>Angular Router</h1>  


  <a routerLink="/todosList" >List of todos</a>  

  <a routerLink="/completed" >Completed todos</a>  



By Md Riyazuddin 2 0
Is this helpful? Yes No

Submit an interview question

Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.

Get Started


Leave a Comment

Check out more interview questions

Based on your skills

MS SQL Server

1434287 1720 18 859


35907 92 0 46


28194 72 1 36