Search code examples
javascriptember.jsember-router

Handling page URL hash parameters outside of Ember.js default routing


In the page which is opened with pre-set location.hash parameters like

<server>/chat.html#?jid=123&friend_jid=321

how do I handle the params without Ember.js throwing an Error into console with manual handling of query string (no Ember routes)?


Solution

  • If you want to disable the hashchange routing. You can use the:

    App.Router.reopen({
      location: 'none'
    });
    

    This is documented in http://emberjs.com/guides/routing/specifying-the-location-api/