1

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?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.