angular-ui/ui-router — pull request #446 by roryf (2013-09-18 22:51:22+00:00)
Title: Add optional parameter matching to $state.is and $state.includes

Fixes #413.

Allows passing a second parameter to `$state.is` and `$state.includes` with parameters for the state. `is` will do a strict `angular.equals` on the passed parameters with the current `$stateParams`, while `includes` will only attempt to match the parameters given.

Examples:
```
{ active: $state.is('site.section', {siteId: site.id, sectionId: section.id)} }
```
```
{ active: $state.includes('site.section', {sectionId: section.id)} }
```

I also changed the method contract so it won't return `undefined` when a state doesn't exist. This didn't make sense to me that a function could return a boolean value, or `undefined`, especially when the docs state it will return a boolean.