2014-07-08 57 views
1

我正在使用ember-cli,并且所有内容都使用默认的内置服务器进行工作。我需要在应用程序上下文中部署到tomcat。在tomcat的应用程序上下文中运行的ember-cli

在配置/ environment.js,我已经设置

baseURL: '/myapp/ember/', 

我可以导航到http://localhost:8085/myap/ember/index.html,可以看到所有的余烬日志消息,但我得到以下。

Error: Assertion Failed: Error: Assertion Failed: The URL '/index.html' did not match any routes in your application

如果我去http://localhost:8085/myap/ember/我收到了404

如果我去http://localhost:8085/myap/ember/index.html#/我收到了404

在余烬检查我可以看到指数路径URL设置为/myapp/ember/,但如果我去这个URL没有指定index.html我得到一个404.

我似乎认为,index.html是由于某种原因的路由。我该如何解决?

+0

你有没有找到一个回答你的问题?如果是这样,你可能应该发布它并将其标记为已接受,以便将来有此问题的人可以找到答案。 – ArtOfWarfare

回答

2

原来我不得不设置的locationType为“哈希”中的config/environment.js

module.exports = function(environment) { 
    var ENV = { 
    environment: environment, 
    baseURL: '/', 
    locationType: 'hash', //auto 
    EmberENV: { 
     FEATURES: { 
     // Here you can enable experimental features on an ember canary build 
     // e.g. 'with-controller': true 
     } 
    }, 

    ... 
相关问题