Skip to content

Commit ebd68d7

Browse files
committed
style($state): comments and whitespace
1 parent f9c2053 commit ebd68d7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/state.js

+8-6
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
294294
* - **parent** `{object}` - returns the parent state object.
295295
* - **data** `{object}` - returns state data, including any inherited data that is not
296296
* 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`.
298299
* - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is
299300
* navigable).
300301
* - **params** `{object}` - returns an array of state params that are ensured to
@@ -310,7 +311,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
310311
* - **path** `{string}` - returns the full path from the root down to this state.
311312
* Needed for state activation.
312313
* - **includes** `{object}` - returns an object that includes every state that
313-
* would pass a '$state.includes()' test.
314+
* would pass a `$state.includes()` test.
314315
*
315316
* @example
316317
* <pre>
@@ -607,6 +608,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
607608
}
608609

609610
root.locals = { resolve: null, globals: { $stateParams: {} } };
611+
610612
$state = {
611613
params: {},
612614
current: root.self,
@@ -856,6 +858,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
856858
// empty and gets filled asynchronously. We need to keep track of the promise for the
857859
// (fully resolved) current locals, and pass this down the chain.
858860
var resolved = $q.when(locals);
861+
859862
for (var l = keep; l < toPath.length; l++, state = toPath[l]) {
860863
locals = toLocals[l] = inherit(locals);
861864
resolved = resolveState(state, toParams, state === to, resolved, locals);
@@ -1018,7 +1021,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
10181021
* </pre>
10191022
*
10201023
* @description
1021-
* Basic globing patterns will also work.
1024+
* Basic globbing patterns will also work.
10221025
*
10231026
* @example
10241027
* <pre>
@@ -1038,7 +1041,6 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
10381041
* that you'd like to test against the current active state.
10391042
* @returns {boolean} Returns true if it does include the state
10401043
*/
1041-
10421044
$state.includes = function includes(stateOrName, params) {
10431045
if (isString(stateOrName) && isGlob(stateOrName)) {
10441046
if (!doesStateMatchGlob(stateOrName)) {
@@ -1143,9 +1145,9 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
11431145
// to the set that should be visible to the state, and are independent of when we update
11441146
// the global $state and $stateParams values.
11451147
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) {
11471149
dst.globals = globals;
1148-
}) ];
1150+
})];
11491151
if (inherited) promises.push(inherited);
11501152

11511153
// Resolve template and dependencies for all views.

0 commit comments

Comments
 (0)