From 556e8eece69b93b89c6ae1cc4cb86d08994a0dfc Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Tue, 8 Oct 2013 10:45:00 -0700 Subject: docs(tutorial): fix style across tutorial steps --- docs/content/tutorial/step_07.ngdoc | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'docs/content/tutorial/step_07.ngdoc') diff --git a/docs/content/tutorial/step_07.ngdoc b/docs/content/tutorial/step_07.ngdoc index 76074417..126b30a8 100644 --- a/docs/content/tutorial/step_07.ngdoc +++ b/docs/content/tutorial/step_07.ngdoc @@ -69,13 +69,23 @@ both module systems can live side by side and fulfil their goals. __`app/js/app.js`:__
-var phonecatApp = angular.module('phonecatApp', []).
-  config(['$routeProvider', function($routeProvider) {
-  $routeProvider.
-      when('/phones', {templateUrl: 'partials/phone-list.html',   controller: PhoneListCtrl}).
-      when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}).
-      otherwise({redirectTo: '/phones'});
-}]);
+var phonecatApp = angular.module('phonecatApp', ['phonecatFilters']);
+
+phonecatApp.config(['$routeProvider',
+  function($routeProvider) {
+    $routeProvider.
+      when('/phones', {
+        templateUrl: 'partials/phone-list.html',
+        controller: 'PhoneListCtrl'
+      }).
+      when('/phones/:phoneId', {
+        templateUrl: 'partials/phone-detail.html',
+        controller: 'PhoneDetailCtrl'
+      }).
+      otherwise({
+        redirectTo: '/phones'
+      });
+  }]);
 
In order to configure our application with routes, we need to create a module for our application. @@ -124,9 +134,10 @@ __`app/index.html`:__ __`app/js/controllers.js`:__
 ...
-phonecatApp.controller('PhoneDetailCtrl', ['$scope', '$routeParams', function($scope, $routeParams) {
-  $scope.phoneId = $routeParams.phoneId;
-}]);
+phonecatApp.controller('PhoneDetailCtrl', ['$scope', '$routeParams',
+  function($scope, $routeParams) {
+    $scope.phoneId = $routeParams.phoneId;
+  }]);
 
@@ -251,6 +262,7 @@ the same binding into the `phone-list.html` template, the binding will work as e inheritance and model property shadowing do some wonders. + # Summary With the routing set up and the phone list view implemented, we're ready to go to {@link step_08 -- cgit v1.2.3