vian
vian

Reputation: 801

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)?

Upvotes: 0

Views: 231

Answers (2)

Marcio Junior
Marcio Junior

Reputation: 19128

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/

Upvotes: 1

vian
vian

Reputation: 801

That was simple. Needed to do some googling before.

Ember.Application.create({ router: null })

Upvotes: 0

Related Questions