Skip to content

Commit d43c1fd

Browse files
cvnchristopherthielen
authored andcommitted
doc(UrlMatcher): RegExp and string encoding interaction (angular-ui#3050)
closes angular-ui#2540
1 parent e3051f5 commit d43c1fd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/url/urlMatcher.ts

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ const memoizeTo = (obj: Obj, prop: string, fn: Function) =>
5353
* (`/somePath/{param:[a-zA-Z0-9]+}`) in a curly brace placeholder.
5454
* The regexp must match for the url to be matched.
5555
* Should the regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.
56+
* Note that a RegExp parameter will encode its value with `string` ParamType encoding: "/" as "~2F", and "~" as "~~".
57+
* When matching these characters, use the encoded versions in the regexp.
58+
* See issue [#2540](https://github.com/angular-ui/ui-router/issues/2540) for more information.
5659
*
5760
* - *Custom parameter types* may also be specified after a colon (`/somePath/{param:int}`)
5861
* in curly brace parameters. See [[UrlMatcherFactory.type]] for more information.

0 commit comments

Comments
 (0)