Merge pull request #2687 from waldenraines/bastion

Bastion: allow directives to work with ui-router, fixes #2638 and #2686.