Skip to content

step-7

@petebacondarwin petebacondarwin tagged this 29 Jun 12:36
- Introduce the [$route] service which allows binding URLs for deep-linking with
  views
  - Create PhoneCatCtrl which governs the entire app and contains $route
    configuration
  - Load the ngRoute module
  - Map `/phones' to PhoneListCtrl and partails/phones-list.html
  - Map `/phones/<phone-id>' to PhoneDetailCtrl and partails/phones-detail.html
  - Copy deep linking parameters to root controller `params` property for access
    in sub controllers
  - Replace content of index.html with [ngView] directive

- Create phone list route
  - Preserve existing PhoneListCtrl controller
  - Move existing html from index.html to partials/phone-list.html
- Create phone details route
  - Empty placeholder PhoneDetailsCtrl controller
  - Empty placeholder partials/phane-details.html template
Assets 2
Loading