Angular 2 Routing Part 1

Topics 

  • What is a Router?
  • Handle “user enters a URL into the browser” 
  • Handle “user clicks a link in a page” 
  • Handle “user actions on a page” 
  • Redirection 
  • Parameters 
  • Query parameters

What is Router?

What is and Why Routing? 

  • In SPA (Single Page Application), everything happens in one page 
    • One layout page with partial fragments filling up the content area 
  • Issues that need to be addressed in SPA application 
    • How do URLs handled? 
    • How should “back” button work? 
    • How should linking between pages work? 
  • Angular routing comes to rescue 
    • It helps you in dividing your application into logical views based on URL patterns - in other words, it simulates the navigation behavior of multi-page application 
    • It also let you bind different views to different components

You must have an active subscription to download PDF and Lab Zip of this course topic.Please click the "Subscribe" button or the "Login" button if you already have an account.