Skip to content

Commit 027f1fc

Browse files
feat(): add json parameter Type
1 parent d726bed commit 027f1fc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/urlMatcherFactory.js

+8
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,14 @@ function $UrlMatcherFactory() {
603603
equals: function (a, b) { return a.toISOString() === b.toISOString(); },
604604
pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,
605605
capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/
606+
},
607+
json: {
608+
encode: angular.toJson,
609+
decode: function(val) {
610+
return angular.fromJson(val) },
611+
is: angular.isObject,
612+
equals: angular.equals,
613+
pattern: /[^/]*/
606614
}
607615
};
608616

0 commit comments

Comments
 (0)