1
votes

I'm using ember-data-source (0.13), ember-rails (0.13.0), ember-source (1.0.0.rc6.2), and the emblem pre-processor.

I have this following router:

Whistlr.Router.map ()->
  @resource('home', path: '/');
  @resource('explore');
  @resource('organizations')

And these links in the header:

li.brand = linkTo 'home'
  = t layout.header.whistlr
li = linkTo 'explore'
  = t layout.header.explore
li = linkTo 'organizations'
  = t layout.header.organizations

I would expect the links to be rendered as:

<a href="/">Whistlr</a>
<a href="/explore">Explore</a>
<a href="/organizations">Organizations</a>

Instead I get:

<a href="#/">Whistlr</a>
<a href="#/explore">Explore</a>
<a href="#/organizations">Organizations</a>

Any idea what's causing that?

1

1 Answers

2
votes

Note from the docs:

By default the Router uses the browser's hash to load the starting state of your application and will keep it in sync as you move around. At present, this relies on a hashchange event existing in the browser.

If you don't want this to be the default behavior you should override the default by configuring your Router with:

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

Hope it helps.