我有以下JS代码到我的ember.js应用程序。没有标签的Ember路线
Beers.Router.map(function(){
this.resource('beers', {path: "/beers"}, function(){
this.route('all');
this.route('new');
});
});
问题是,我只能访问使用域/#/啤酒/所有。阅读ember.js文档,我尝试使用这个:
App.Router.reopen({
location: 'history'
});
但是不行。我想访问使用以下网址:域名/啤酒/所有
我做错了什么?
谢谢
对。那么,如果没有使用History API,只有第一个代码,它不应该工作? – elf
我不确定我是否理解 - 该怎么办? – chopper
对不起,我的意思是:看起来代码是正确的,但是无法访问域名/啤酒/全部 – elf