Once your application is set up for deep linking, there are a few more steps you will need to take in order to link your sub-templates. This video tutorial gives you detailed instructions that will help you learn more about wiring a second partial in AngularJS so your single page functions like a multi-page website.
…We have the basic structure so that our application…can handle routing, but we're only using a single partial.…So all it does now is show a list of the artists.…It would be great to make the list elements click…through to a more detailed view of the artists information.…We can do that by wiring up a second partial.…So we're going to do is, on the app js…document is put in parameters for a second partial.…When somebody goes to the page and types in…details and then we also ask for an item…ID, because we want to know which item we have…clicked on, then I want you do the following.…
So this is going to be pretty much like…the list view but just emphasizing a details view.…And what I want to do is to specify the template.…So template URL just like before and this one's going to…be in the partials folder and it's going to be called details.html.…The next thing we need to specify is the controller…that's going to control this template, so we'll do that next.…Controller is going to be something called DetailsController.…
- What is AngularJS?
- Working with complex models
- Using a the $http service to read a JSON file
- Binding data
- Dividing your app into partials
- Creating a details template
- Using AngularJS animation events
Skill Level Intermediate
Q: This course was updated on 12/11/2015. What changed?
A: We updated two movies ("Creating our details template" and "Adding navigation to our details page") to reflect changes to AngularJS 1.4.8 and the 1.5 beta.