Compatibility with ui-router project

This is the same as: https://github.com/angular-ui/ui-utils/pull/40

I missed the instruction to create a new branch for the previous PR, this should be fixed here.