@@ -294,7 +294,8 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
294
294
* - **parent** `{object}` - returns the parent state object.
295
295
* - **data** `{object}` - returns state data, including any inherited data that is not
296
296
* overridden by own values (if any).
297
- * - **url** `{object}` - returns a {link ui.router.util.type:UrlMatcher} or null.
297
+ * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}
298
+ * or `null`.
298
299
* - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is
299
300
* navigable).
300
301
* - **params** `{object}` - returns an array of state params that are ensured to
@@ -310,7 +311,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
310
311
* - **path** `{string}` - returns the full path from the root down to this state.
311
312
* Needed for state activation.
312
313
* - **includes** `{object}` - returns an object that includes every state that
313
- * would pass a ' $state.includes()' test.
314
+ * would pass a ` $state.includes()` test.
314
315
*
315
316
* @example
316
317
* <pre>
@@ -607,6 +608,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
607
608
}
608
609
609
610
root . locals = { resolve : null , globals : { $stateParams : { } } } ;
611
+
610
612
$state = {
611
613
params : { } ,
612
614
current : root . self ,
@@ -856,6 +858,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
856
858
// empty and gets filled asynchronously. We need to keep track of the promise for the
857
859
// (fully resolved) current locals, and pass this down the chain.
858
860
var resolved = $q . when ( locals ) ;
861
+
859
862
for ( var l = keep ; l < toPath . length ; l ++ , state = toPath [ l ] ) {
860
863
locals = toLocals [ l ] = inherit ( locals ) ;
861
864
resolved = resolveState ( state , toParams , state === to , resolved , locals ) ;
@@ -1018,7 +1021,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
1018
1021
* </pre>
1019
1022
*
1020
1023
* @description
1021
- * Basic globing patterns will also work.
1024
+ * Basic globbing patterns will also work.
1022
1025
*
1023
1026
* @example
1024
1027
* <pre>
@@ -1038,7 +1041,6 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
1038
1041
* that you'd like to test against the current active state.
1039
1042
* @returns {boolean } Returns true if it does include the state
1040
1043
*/
1041
-
1042
1044
$state . includes = function includes ( stateOrName , params ) {
1043
1045
if ( isString ( stateOrName ) && isGlob ( stateOrName ) ) {
1044
1046
if ( ! doesStateMatchGlob ( stateOrName ) ) {
@@ -1143,9 +1145,9 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
1143
1145
// to the set that should be visible to the state, and are independent of when we update
1144
1146
// the global $state and $stateParams values.
1145
1147
dst . resolve = $resolve . resolve ( state . resolve , locals , dst . resolve , state ) ;
1146
- var promises = [ dst . resolve . then ( function ( globals ) {
1148
+ var promises = [ dst . resolve . then ( function ( globals ) {
1147
1149
dst . globals = globals ;
1148
- } ) ] ;
1150
+ } ) ] ;
1149
1151
if ( inherited ) promises . push ( inherited ) ;
1150
1152
1151
1153
// Resolve template and dependencies for all views.
0 commit comments