You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

819 B

What is Routing?

Lesson Objectives

  1. Describe Routing
  2. Demo Routing

Describe Routing

  • Routing is the process an app uses mimic the feel of traditional navigation
  • The process:
    1. Define a set of URLs for the app to listen for
    2. When a user visits those particular URLs, the app will load a component into a specific part of the page

Demo Routing

Demo the site in /router. Show the following:

  1. Clicks on the various links
    • Note the nested links for /about
    • Note the url params for /resume
  2. Demonstrate sharing/bookmarking a URL
    1. Copy a url like http://localhost:4200/links
    2. Close the browser
    3. Reopen the browser
    4. Paste the link into the URL bar
    5. Hit Enter
    6. Note that it takes you directly the "page" whose URL you copied