2014-07-08 59 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 
     } 
    }, 

    ... 
相關問題