-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Deprecated `setNestedState` in favor of `state`, to match `$stateProvider`. - Added support for chaining `state` calls. - Updated dependencies
- Loading branch information
Mark Lagendijk
committed
Oct 30, 2014
1 parent
2ee5ab9
commit fad3d6d
Showing
7 changed files
with
76 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "angular-ui-router.stateHelper", | ||
"main": "statehelper.js", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"homepage": "https://github.com/marklagendijk/ui-router.stateHelper", | ||
"authors": [ | ||
"Mark Lagendijk <[email protected]>" | ||
|
@@ -27,10 +27,10 @@ | |
"config" | ||
], | ||
"dependencies": { | ||
"angular": "~1.2.13", | ||
"angular-ui-router": "~0.2.7" | ||
"angular": ">=1.2.0", | ||
"angular-ui-router": "~0.2.11" | ||
}, | ||
"devDependencies": { | ||
"angular-mocks": "~1.2.8" | ||
"angular-mocks": ">=1.2.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"karma": "~0.11.9", | ||
"gulp": "~3.8.0", | ||
"gulp-karma": "0.0.1", | ||
"gulp-ng-annotate": "^0.3.3", | ||
"gulp-rename": "~0.2.1", | ||
"gulp-uglify": "~0.1.0", | ||
"karma": "^0.12.24", | ||
"karma-chrome-launcher": "~0.1.2", | ||
"karma-jasmine": "~0.1.5", | ||
"karma-firefox-launcher": "~0.1.3", | ||
"karma-jasmine": "~0.1.5", | ||
"karma-phantomjs-launcher": "~0.1.1", | ||
"karma-requirejs": "~0.2.1", | ||
"karma-script-launcher": "~0.1.0", | ||
"gulp": "~3.3.0", | ||
"gulp-uglify": "~0.1.0", | ||
"gulp-karma": "0.0.1", | ||
"gulp-rename": "~0.2.1", | ||
"gulp-ngmin": "^0.1.2" | ||
"karma-script-launcher": "~0.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Mark Lagendijk <[email protected]> | ||
* @license MIT | ||
*/ | ||
angular.module('ui.router.stateHelper', ['ui.router']) | ||
angular.module('ui.router.stateHelper', [ 'ui.router' ]) | ||
.provider('stateHelper', function($stateProvider){ | ||
var self = this; | ||
|
||
|
@@ -19,8 +19,8 @@ angular.module('ui.router.stateHelper', ['ui.router']) | |
* @param {Array} [state.children] - An optional array of child states. | ||
* @param {Boolean} keepOriginalNames - An optional flag that prevents conversion of names to dot notation if true. | ||
*/ | ||
this.setNestedState = function(state, keepOriginalNames){ | ||
if (!keepOriginalNames){ | ||
this.state = function(state, keepOriginalNames){ | ||
if(!keepOriginalNames){ | ||
fixStateName(state); | ||
} | ||
$stateProvider.state(state); | ||
|
@@ -31,8 +31,12 @@ angular.module('ui.router.stateHelper', ['ui.router']) | |
self.setNestedState(childState, keepOriginalNames); | ||
}); | ||
} | ||
|
||
return self; | ||
}; | ||
|
||
this.setNestedState = this.state; | ||
|
||
self.$get = angular.noop; | ||
|
||
/** | ||
|
@@ -44,5 +48,4 @@ angular.module('ui.router.stateHelper', ['ui.router']) | |
state.name = state.parent.name + '.' + state.name; | ||
} | ||
} | ||
}) | ||
; | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters