Open al-the-x opened 9 years ago
[ ] Routing Concepts
ng-include
menu.html
products.html
index.html
products
about.html
page
<!-- Somewhere in `menu.html`... --> <nav> <a href ng-click="app.page = 'products'; app.category = 'men'">Stuff for Men</a> <!-- More categories... --> <a href ng-click="app.page = 'about'">About</a> </nav> <!-- Additional markup, probably... --> <div class="container" ng-include="app.page + '.html'"></div>
ngRouter
controller
controllerAs
product.html
ng-switch
ui-router
about
category
products.grid
products.list
ng-grid
This change is
This lesson can go on Wed or Thu like #338
[ ] Routing Concepts
ng-include
to includemenu.html
andproducts.html
inindex.html
menu.html
andproducts.html
index.html
menu.html
includes eitherproducts.html
with a filtered list ofproducts
about.html
menu.html
to changepage
property:ngRouter
...controller
/controllerAs
initially, just switch the template.ng-include
to includeproduct.html
insideproducts.html
ng-switch
to only displayproduct.html
in the "grid" view modeui-router
states:about
stateproducts
state withcategory
slugproducts.grid
andproducts.list
statesng-grid
This change is![Reviewable](https://reviewable.io/review_button.svg)