Skip to content

Commit

Permalink
1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
artch committed Jun 15, 2015
1 parent 615d65d commit 9f2b2d2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-route-segment",
"version": "1.4.0",
"version": "1.5.0",
"main": "build/angular-route-segment.js",
"ignore": [
"**/.*",
Expand Down
15 changes: 10 additions & 5 deletions build/angular-route-segment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* angular-route-segment 1.4.0
* angular-route-segment 1.5.0
* https://angular-route-segment.com
* @author Artem Chivchalov
* @license MIT License http://opensource.org/licenses/MIT
Expand Down Expand Up @@ -124,12 +124,17 @@ mod.provider( '$routeSegment',

/**
* The shorthand for $routeProvider.when() method with specified route name.
* @param {string} route Route URL, e.g. '/foo/bar'
* @param {string} path Route URL, e.g. '/foo/bar'
* @param {string} name Fully qualified route name, e.g. 'foo.bar'
* @param {Object} route Mapping information to be assigned to $route.current on route match.
*/
$routeSegmentProvider.when = function(route, name) {
$routeProvider.when(route, {segment: name});
segmentRoutes[name] = route;
$routeSegmentProvider.when = function(path, name, route) {
if (route == undefined)
route = {};
route.segment = name;

$routeProvider.when(path, route);
segmentRoutes[name] = path;
return this;
};

Expand Down
4 changes: 2 additions & 2 deletions build/angular-route-segment.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-route-segment",
"version": "1.4.0",
"version": "1.5.0",
"devDependencies": {
"grunt": "",
"grunt-contrib-uglify": "",
Expand Down

0 comments on commit 9f2b2d2

Please sign in to comment.