Routing
Add routes to build powerful single-page applications.
StartRouting
Lesson 1 of 1
- 2Great! A gallery of images shows up. How does it work? 1. In app.js inside the app.config() method, we use Angular’s $routeProvider to define the application routes. 2. We used .when() to map t…
- 3What did we just do? 1. In app.js, we mapped a URL to PhotoController and photo.html. We added a variable part named id to the URL, like this: /photos/:id. 2. In PhotoController, we used A…
- 4Why are routes useful? Instead of filling a single view with more code than needed, routes let us map URLs to self-contained controllers and templates. Furthermore, now that the app has URLs, users…
What you'll create
Portfolio projects that showcase your new skills
Outbox 2
In this project, you'll add to your email app by mapping URLs to views.
Calendar
In this project, we're going to practice routing in AngularJS so you can hone your skills and feel confident taking them to the real world. Why? The ngRoute module allows us to navigate around our webpage without dealing with page reloading.
Reader
In this project, we're going to practice routing in AngularJS so you can hone your skills and feel confident taking them to the real world. Why? The ngRoute module allows us to navigate around our webpage without dealing with page reloading.
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory