docs(ng-view): improve the ng-view docs

This commit is contained in:
Igor Minar 2012-03-06 14:26:43 -08:00
parent 1b4289ce76
commit 7f6c1093f5

View file

@ -485,7 +485,7 @@ var ngNonBindableDirective = ngDirective({ terminal: true });
* Every time the current route changes, the included view changes with it according to the
* configuration of the `$route` service.
*
*
* @scope
* @example
<doc:example module="ngView">
<doc:source>
@ -502,8 +502,14 @@ var ngNonBindableDirective = ngDirective({ terminal: true });
<script>
angular.module('ngView', [], function($routeProvider, $locationProvider) {
$routeProvider.when('/Book/:bookId', {template: 'examples/book.html', controller: BookCntl});
$routeProvider.when('/Book/:bookId/ch/:chapterId', {template: 'examples/chapter.html', controller: ChapterCntl});
$routeProvider.when('/Book/:bookId', {
template: 'examples/book.html',
controller: BookCntl
});
$routeProvider.when('/Book/:bookId/ch/:chapterId', {
template: 'examples/chapter.html',
controller: ChapterCntl
});
// configure html5 to get links working on jsfiddle
$locationProvider.html5Mode(true);