You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This file contains hidden or 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
regex for the route is constructed once and then reused
allows provide regex expressions for params in the constraints object:
$routeProvider.when('/user/:id/:age', {template:'user.html'}, {id:"[0-9]", age:"[0-9]"})
list of values is supported using regular expression:
$routeProvider.when('/some/:param', {template:'foo.html'}, {param:"one|two|tree"});
supports predefined types for paramsters (int, float, bool, string):
$routeProvider.when('/some/:param', {template:'foo.html'}, {param:"float"});
$routeParams.param will be typeof number
predefined types can be extended, bu extending $routeProvider.shortcut object
Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).
CLA is important for us to be able to avoid legal troubles down the road.
Copy & Paste this into PRs: "Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).
CLA is important for us to be able to avoid legal troubles down the road.
Thanks for the PR, and very sorry about the delay in getting to it. Unfortunately this feature is not yet done. There are few use cases outlined in comments which do not work, and the PR is missing documentation. Could you update it and rebase to master and we will have another look. We promise not to take 3 months again. Again sorry about the delay.
I understand this may not be a priority for you, so I am going to close this request so that it does not show up in our list. Once you update the changes requested please reopen the request.
I would like to allow routes with a variable amount of subcategories
/category1/category2/category/3 where category 2 and 3 are optional but parsed & their resources resolved if they exist.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
9 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit related to the issue #918
$routeProvider.when('/user/:id/:age', {template:'user.html'}, {id:"[0-9]", age:"[0-9]"})
$routeProvider.when('/some/:param', {template:'foo.html'}, {param:"one|two|tree"});
$routeProvider.when('/some/:param', {template:'foo.html'}, {param:"float"});
$routeParams.param will be typeof number
Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement).
CLA is important for us to be able to avoid legal troubles down the road.
For individuals (a simple click-through form):
https://code.google.com/legal/individual-cla-v1.0.html
For corporations (print, sign and scan+email, fax or mail):
https://code.google.com/legal/corporate-cla-v1.0.html