I have a specific use case;
- Angular child application running independently within a larger dojo based host application.
- Hash based routing in the dojo host application
- Requirement for hash based routing rather than html5 history api
- Requirement for routing within Angular child application.
- Requirement for Angular child application to use and react to only the portion of the hash after a colon delimiter
Example url:
domain.com/my/page#myDojoHash:my/ui/router/hash/path
Current example ui-router state:
$stateProvider
.state({
name: 'index',
url: '/{dojoHash:.+:}my/ui/router/hash/path',
template: homeTemplate
})
In this case dojo works fine, as I can parse out the first part of the url using regex.
Ui-router is also able to load pages.
My question is how can I make ui-router react to changes in the second part of the hash only? Specifically, when the dojo application changes the hash how can I prevent the angular app from reacting?
Is it possible to hook in to the hash change event for ui-router, test the hash using a regex and react, or not, accordingly?