Skip to content

Commit

Permalink
style($state): comments and whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
nateabele committed Apr 21, 2014
1 parent f9c2053 commit ebd68d7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,8 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
* - **parent** `{object}` - returns the parent state object.
* - **data** `{object}` - returns state data, including any inherited data that is not
* overridden by own values (if any).
* - **url** `{object}` - returns a {link ui.router.util.type:UrlMatcher} or null.
* - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}
* or `null`.
* - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is
* navigable).
* - **params** `{object}` - returns an array of state params that are ensured to
Expand All @@ -310,7 +311,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
* - **path** `{string}` - returns the full path from the root down to this state.
* Needed for state activation.
* - **includes** `{object}` - returns an object that includes every state that
* would pass a '$state.includes()' test.
* would pass a `$state.includes()` test.
*
* @example
* <pre>
Expand Down Expand Up @@ -607,6 +608,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
}

root.locals = { resolve: null, globals: { $stateParams: {} } };

$state = {
params: {},
current: root.self,
Expand Down Expand Up @@ -856,6 +858,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
// empty and gets filled asynchronously. We need to keep track of the promise for the
// (fully resolved) current locals, and pass this down the chain.
var resolved = $q.when(locals);

for (var l = keep; l < toPath.length; l++, state = toPath[l]) {
locals = toLocals[l] = inherit(locals);
resolved = resolveState(state, toParams, state === to, resolved, locals);
Expand Down Expand Up @@ -1018,7 +1021,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
* </pre>
*
* @description
* Basic globing patterns will also work.
* Basic globbing patterns will also work.
*
* @example
* <pre>
Expand All @@ -1038,7 +1041,6 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
* that you'd like to test against the current active state.
* @returns {boolean} Returns true if it does include the state
*/

$state.includes = function includes(stateOrName, params) {
if (isString(stateOrName) && isGlob(stateOrName)) {
if (!doesStateMatchGlob(stateOrName)) {
Expand Down Expand Up @@ -1143,9 +1145,9 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory) {
// to the set that should be visible to the state, and are independent of when we update
// the global $state and $stateParams values.
dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state);
var promises = [ dst.resolve.then(function (globals) {
var promises = [dst.resolve.then(function (globals) {
dst.globals = globals;
}) ];
})];
if (inherited) promises.push(inherited);

// Resolve template and dependencies for all views.
Expand Down

0 comments on commit ebd68d7

Please sign in to comment.