From 027f1fcf9c0916cea651e88981345da6f9ff214a Mon Sep 17 00:00:00 2001 From: christopherthielen Date: Thu, 20 Nov 2014 18:06:09 -0600 Subject: [PATCH] feat(): add json parameter Type --- src/urlMatcherFactory.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/urlMatcherFactory.js b/src/urlMatcherFactory.js index 169deac4f..4ea8a8a87 100644 --- a/src/urlMatcherFactory.js +++ b/src/urlMatcherFactory.js @@ -603,6 +603,14 @@ function $UrlMatcherFactory() { equals: function (a, b) { return a.toISOString() === b.toISOString(); }, pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/, capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/ + }, + json: { + encode: angular.toJson, + decode: function(val) { + return angular.fromJson(val) }, + is: angular.isObject, + equals: angular.equals, + pattern: /[^/]*/ } };