Href="#" in ember-cli 2.7.0 not working


#1

href="#" in ember-cli 2.7.0 does not seem to work anymore. Is changing it to href="{{rootURL}}\"the way?

https://github.com/broerse/ember-cli-blog/commit/a8cecd8558460efd839c5e6d0f5ba81ca2cd2056


#2

What do you try to achieve? Make the link to the root of the site or not do anything on click/tap? The former can be had with {{link-to "Link text" 'index'}} while the latter, I think, can be achieved by just not defining an href attribute.


#3

The href="#" was in the original Bloggr example by @tomdale . It has always worked as a reload of the application. In ember-cli 2.7.0 this stopped working. So {{link-to "Link text" 'index'}} would not reload the application the same way as href="#". My change to href="{{rootURL}}\" gave the same behavior but feels somehow not the way to go.


#4

I tried and <a href={{rootURL}}> does not even work for me. Do you set rootURL on your controller?


#5

It is href="{{rootURL}}\" with the \. rootURL is new for 2.7.0 because baseURL is deprecated. It works here http://bloggr.exmer.com/


#6

I should have wrote <a href={{rootURL}}> I think. The \ was wrong. Tried / but <a href={{rootURL}}> is not working at all it seems. There are more problems with the rootURL change. See: http://emberjs.com/blog/2016/04/28/baseURL.html#comment-2805592122

I will change the behavior for the Bloggr example because the old behavior was strange anyway. So we can stop thinking about this issue.

Thanks for your input and help.