[英]How do I set the root URL in Ember
我的Ember应用程序位于example.com/path/to/ember_app
。
我的问题是,Ember似乎是根据站点根目录而不是应用程序的根目录来生根所有内容,因此,当我希望将ember根目录为:
example.com/path/to/ember_app/**news_items**
我在example.com/news_items
上收到500 (Internal Server Error)
(GET)。
MyApp.IndexRoute = Ember.Route.extend({
redirect: function() {
this.transitionTo('example.path');
}
});
这应该会对您有所帮助,这基本上会将您应用的索引路由重定向到example.path路由。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.