diff options
Diffstat (limited to 'src/ngRoute/directive')
| -rw-r--r-- | src/ngRoute/directive/ngView.js | 31 | 
1 files changed, 16 insertions, 15 deletions
| diff --git a/src/ngRoute/directive/ngView.js b/src/ngRoute/directive/ngView.js index 1706e25a..ab1327d0 100644 --- a/src/ngRoute/directive/ngView.js +++ b/src/ngRoute/directive/ngView.js @@ -113,20 +113,21 @@ ngRouteModule.directive('ngView', ngViewFactory);        </file>        <file name="script.js"> -        angular.module('ngViewExample', ['ngRoute', 'ngAnimate'], function($routeProvider, $locationProvider) { -          $routeProvider.when('/Book/:bookId', { -            templateUrl: 'book.html', -            controller: BookCntl, -            controllerAs: 'book' -          }); -          $routeProvider.when('/Book/:bookId/ch/:chapterId', { -            templateUrl: 'chapter.html', -            controller: ChapterCntl, -            controllerAs: 'chapter' -          }); - -          // configure html5 to get links working on jsfiddle -          $locationProvider.html5Mode(true); +        angular.module('ngViewExample', ['ngRoute', 'ngAnimate'], +          function($routeProvider, $locationProvider) { +            $routeProvider.when('/Book/:bookId', { +              templateUrl: 'book.html', +              controller: BookCntl, +              controllerAs: 'book' +            }); +            $routeProvider.when('/Book/:bookId/ch/:chapterId', { +              templateUrl: 'chapter.html', +              controller: ChapterCntl, +              controllerAs: 'chapter' +            }); + +            // configure html5 to get links working on jsfiddle +            $locationProvider.html5Mode(true);          });          function MainCntl($route, $routeParams, $location) { @@ -238,7 +239,7 @@ function ngViewFactory(   $route,   $anchorScroll,   $compile,   $controller,              cleanupLastView();            }          } -      } +      };      }    };  } | 
