How to remove #(hash) from URL in ember application (non - CLI). I am using ember v2.15.
Asked
Active
Viewed 63 times
1
-
Welcome to StackOverflow! Please read the info about [how to ask a good question](https://stackoverflow.com/help/how-to-ask) and [how to give a reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). This will make it much easier for others to help you. – Aditi Mar 21 '18 at 06:54
1 Answers
2
Have a look at the location documentation.
You can specify which type you want.
Setting location
to history
on EmberRouter
will remove the hash from the url and instead use browser history. To disable it altogether, set location
to none
.
const Router = EmberRouter.extend({
location: 'none',
rootURL: '/'
})

alizahid
- 959
- 6
- 17
-
Your code has a router in it, yes? Add the `location` attribute with the value `none` to it. – alizahid Mar 22 '18 at 04:20
-
-
This worked for me : App.Router = Ember.Router.extend({ location: 'history', rootURL: '/root/' }); :: Thanks – Vipin Dhiman Mar 22 '18 at 07:38