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.
29 lines
818 B
29 lines
818 B
# What is Routing?
|
|
|
|
## Lesson Objectives
|
|
|
|
1. Describe Routing
|
|
1. 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
|
|
1. 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](/router). Show the following:
|
|
|
|
1. Clicks on the various links
|
|
- Note the nested links for `/about`
|
|
- Note the url params for `/resume`
|
|
1. Demonstrate sharing/bookmarking a URL
|
|
1. Copy a url like http://localhost:4200/links
|
|
1. Close the browser
|
|
1. Reopen the browser
|
|
1. Paste the link into the URL bar
|
|
1. Hit Enter
|
|
1. Note that it takes you directly the "page" whose URL you copied
|