splittypie
splittypie copied to clipboard
page reload on "new event"
I am having trouble trying to run this on OSX 10.11:
mcnesium@mcobst:~/Sites/splittypie$ git pull
Already up-to-date.
mcnesium@mcobst:~/Sites/splittypie$ npm install
mcnesium@mcobst:~/Sites/splittypie$ bower install
mcnesium@mcobst:~/Sites/splittypie$ ember server
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
Build successful - 20321ms.
Slowest Trees | Total
----------------------------------------------+---------------------
EslintValidationFilter | 4976ms
EslintValidationFilter | 2711ms
Babel | 1155ms
Slowest Trees (cumulative) | Total (avg)
----------------------------------------------+---------------------
EslintValidationFilter (3) | 8556ms (2852 ms)
Babel (25) | 4178ms (167 ms)
The front page looks alright when opening http://localhost:4200/
in Firefox, but when I hit "Create New Event", the app reloads the front page and in the Dev Tools Console the first entry says, it lost connection to ws://localhost:49152/livereload
. Any idea, what's the matter here?
Hey @mcnesium, here is the thing. There is always some preloaded html (see app/preloaders
), just to show the user something immediately before Ember app start. When the Ember app is ready, the preloader is removed see here. So, I've got 2 preloaders one for index route (index-preload) and one for the rest of application (app-preload). Index preload is used for index.html
, app-preload for app.html
(this file is generated from index.html
by ember-index plugin). I have rewrite set on the production server to use app.html file for requests other than /
. Unfortunately, and I know this is kinda inconvenience, there is no rewriting for the development server set (please feel free to open PR :)). So, index.html
is used all the time. That's why on development machine you see main page first, even if you enter let's say /new
address. In production, with rewrite set to app.html
, you would see something like "Loading Splittypie...".
I think in your case Ember app wasn't fully loaded when you clicked Create New Event
(so that was just normal link, not an ember link). You went to /new
address and application started loading once again.