parent
794de610f2
commit
05832f64dc
@ -1 +1,28 @@
|
|||||||
display certain components based the url
|
## 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
|
||||||
|
|||||||
Loading…
Reference in new issue