angular-ui/ui-router — pull request #1032 by nateabele (2014-04-17 20:29:20+00:00)
Title: Typed and optional parameters

## I have overhauled the URL-matching system

Here's a run-down of the new goodies and various other relevant notes:

* **[BC-BREAK]**: `params` is no longer mutually exclusive with `url`, and instead of being an array, it is now an object where the keys are parameter names and the values are the parameter's configuration

* Optional parameters / default values: adding `params: { foo: { value: null } }` makes the `foo` parameter optional in a URL — changing `null` to, for example, `"bar"`, will populate `$stateParams.foo` with `"bar"` when no value is supplied (see the tests for extended examples)

* **[BC-BREAK]**: `$urlMatcherFactoryProvider.caseInsensitiveMatch()` is now `$urlMatcherFactoryProvider.caseInsensitive()`, and the second parameter of `UrlMatcher`'s constructor is an object hash rather than a boolean

* Strict mode (and consequently, non-strict mode): users now have the option of disabling 'strict mode', which allows `UrlMatcher`s to match URLs with or without a trailing slash — see `$urlMatcherFactoryProvider.strictMode()`

* Deferred location change interception for `$urlRouter` — this isn't directly related, but I snuck it in anyway: users now have the ability to delay `$urlRouter` from binding to `$locationChangeSuccess`, allowing the injection of custom behavior prior to syncing the state machine to the current URL.. see the docs for more info

* Custom parameter types: the ability to define custom type objects that help eliminate boilerplate in controllers and resolves by encapsulating common patterns for serializing and deserializing URL parameters; includes built-in types for several JS primitives; see the docs for more info & examples

* Lots of cleanup, tests, and docs