Tutorial by Examples

Similar to int but accepts only positive integers (useful for pagination when there is a page parameter. Define: module.config(['$urlMatcherFactoryProvider', function($urlMatcherFactory) { $urlMatcherFactory.type('page', { decode: function(val) { return +val; }, encode: function(val) ...
Define: module.config(['$urlMatcherFactoryProvider', function($urlMatcherFactory) { $urlMatcherFactory.type('boolean', { decode: function(val) { return val == true || val == "true" }, encode: function(val) { return val ? 1 : 0; }, equals: function(a, b) { return this.is(...
By default, ui-router encodes the slash / inside parameters. If you want to send a path in the URL, you need to define a custom parameter type. Define: module.config(['$urlMatcherFactoryProvider', function($urlMatcherFactory) { $urlMatcherFactory.type('path', { decode: function(val) { retu...

Page 1 of 1