I'm using the angular-ui-router library and I have a problem with URLs.
I have the following code:
app.js:
app.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('state', {
url: '/state',
templateUrl: 'templates/state.html',
onEnter: function () {
/*... code ...*/
}
})});
index.html:
<a href="#/state">STATE</a>
This works, but when I remove '#' from the <a>
tag this doesn't work.
How can I delete the '#' sign from the URL?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…