Skip to content

Commit

Permalink
feat(): add json parameter Type
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherthielen committed Nov 21, 2014
1 parent d726bed commit 027f1fc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/urlMatcherFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: /[^/]*/
}
};

Expand Down

3 comments on commit 027f1fc

@futurechan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is what I think it is... aw yeah! Is there an example of how to use this?

@futurechan
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christopherthielen, do you have an example?

@christopherthielen
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.