File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,22 @@ angular.module('uiRouterSample', [
91
91
} , 100 ) ;
92
92
} ]
93
93
} )
94
+
95
+ . state ( 'me' , {
96
+ url : '/me' ,
97
+ template : "<h1>Me, <a ui-sref=\"giserman\">Giserman</a></h1>"
98
+ } )
99
+
100
+ . state ( 'giserman' , {
101
+ parent : 'me' ,
102
+ independent : true ,
103
+ url : '/giserman' ,
104
+ views : {
105
+ 'giserman@' : {
106
+ template : "<h1>Giserman, <a ui-sref=\"^\">me</a></h1>"
107
+ }
108
+ }
109
+ } )
94
110
}
95
111
]
96
112
) ;
Original file line number Diff line number Diff line change 12
12
<!-- Include both angular.js and angular-ui-router.js-->
13
13
< script src ="../lib/angular-1.2.14/angular.js "> </ script >
14
14
< script src ="../lib/angular-1.2.14/angular-animate.js "> </ script >
15
- < script src ="../release /angular-ui-router.js "> </ script >
15
+ < script src ="../build /angular-ui-router.js "> </ script >
16
16
17
17
<!-- app.js declares the uiRouterSample module and adds items to $rootScope, and defines
18
18
the "home" and "about" states
50
50
its descendant states are activated. -->
51
51
< li ng-class ="{active: $state.includes('contacts')} "> < a ui-sref ="contacts.list "> Contacts</ a > </ li >
52
52
< li ui-sref-active ="active "> < a ui-sref ="about "> About</ a > </ li >
53
+ < li ui-sref-active ="me "> < a ui-sref ="me "> Me</ a > </ li >
53
54
</ ul >
54
55
55
56
<!-- Here is a named ui-view. ui-views don't have to be named, but we'll be populate this
61
62
<!-- Here is the main ui-view (unnamed) and will be populated by its immediate children's templates
62
63
unless otherwise explicitly named views are targeted. It's also employing ng-animate. -->
63
64
< div ui-view class ="container slide " style ="padding-top: 80px; "> </ div >
65
+ < div ui-view ="giserman " class ="container slide "> </ div >
64
66
65
67
66
68
< hr >
You can’t perform that action at this time.
0 commit comments