Some prerequisites ...
We have an ASP.NET application that we are slowly moving to EmberJS. We have one Ember application that we create for certain parts of the site. As the pages migrate, they get routes in the Ember app. The goal is to have everything in Amber with time. In the meantime, the user can click links that return parts of ASP.NET.
Our problem is resetting the state of the Ember application if the user either clicks on it to return to Ember or clicks on a new link that returns them to the Ember part.
We tried to call .reset in the application, but we get an error message. Our application is called ConsoleCli, not a standard application.
Library "ConsoleCli" is already registered with Ember
In addition, we get the following error: one of our modules is already registered.
Cannot re-register: `location:history-js`, as it has already been resolved.
I tried to wrap the registration of the history module with a check, but this creates a number of errors
if(!application.__container__.lookup('location:history-js')){ application.register('location:history-js', HistoryJsLocation, { singleton: true }); }
I am reading https://github.com/emberjs/ember.js/issues/10310 , and I think this means that reset () should clear all registries as soon as all of this merges the main branches.
Should you not call the App.reset () application right in the middle of using the EmberJS application, only reset without problems?
Sorry that I do not understand, we are just learning all this when we go.
We are launching the following versions.
Ember 1.11.0-beta.2 Ember Data 1.0.0-beta.15 jQuery 2.0.3
TIA!
dharga
source share