You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Ember CLI 0.2.3 with ember-cli-cordova 0.0.16. The Ember app is connected to a Rails API. Thus, I use ember server --proxy http://localhost:3000. If I set EMBER_CLI_CORDOVA=1, this changes the URLs of my app: The top route of my app is now http://localhost:4200/#/ instead of http://localhost:4200/. Under http://localhost:4200/ I now get the top route's template of the Rails app, which is equivalent to http://localhost:3000/.
So, ember-cli-cordova is changing routes. IMHO, it shouldn't do that. Is this intended? Update:
This seems to be an effect of the ember-cli proxy (see ember-cli/ember-cli#3398). Apparently, only sub paths are properly proxied (ember-cli/ember-cli#3398 (comment)). If / is proxied, you will need a hash based routing to access it: /#/.
Ember-cli-cordova doesn't work correctly with proxy. Not only will the routes change, but now it tries to GET /cordova.js from the proxy instead of the ember host (which would be GET /#/cordova.js).
The text was updated successfully, but these errors were encountered:
Awem
changed the title
Cordovy with enabled Ember-CLI proxy feature messes up URL
Cordova with enabled Ember-CLI proxy feature changes routes
Apr 13, 2015
@dukex thanks, but I already had those settings. If they are not set, ember-cli-cordova even prints an error message.
Awem
changed the title
Cordova with enabled Ember-CLI proxy feature changes routes
Cordova with enabled Ember-CLI proxy suffers from hash based routing
Apr 15, 2015
@dukex Please see the updates to my post. The problem is, that defaultLocationType is overriden by the proxy. Thus, ember-cli-cordova does not work correctly with the proxy feature for now.
I'm using Ember CLI
0.2.3
with ember-cli-cordova0.0.16
. The Ember app is connected to a Rails API. Thus, I useember server --proxy http://localhost:3000
. If I setEMBER_CLI_CORDOVA=1
, this changes the URLs of my app: The top route of my app is nowhttp://localhost:4200/#/
instead ofhttp://localhost:4200/
. Underhttp://localhost:4200/
I now get the top route's template of the Rails app, which is equivalent tohttp://localhost:3000/
.So, ember-cli-cordova is changing routes. IMHO, it shouldn't do that. Is this intended?
Update:
This seems to be an effect of the ember-cli proxy (see ember-cli/ember-cli#3398). Apparently, only sub paths are properly proxied (ember-cli/ember-cli#3398 (comment)). If
/
is proxied, you will need a hash based routing to access it:/#/
.Ember-cli-cordova doesn't work correctly with proxy. Not only will the routes change, but now it tries to
GET /cordova.js
from the proxy instead of the ember host (which would beGET /#/cordova.js
).The text was updated successfully, but these errors were encountered: