marcj / angular2-localstorage

Angular 2+ decorator to save and restore variables/class properties to HTML5 LocalStorage automatically.
302 stars 107 forks source link

Does not work on angular 2.0.0-rc.4 #57

Open SET001 opened 8 years ago

SET001 commented 8 years ago

while trying to bootstrap it like this:

var appPromise = bootstrap(AppComponent, [LocalStorageService]);

LocalStorageSubscriber(appPromise);

it give an error:

Uncaught Cannot resolve all parameters for 'LocalStorageService'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'LocalStorageService' is decorated with Injectable.

SET001 commented 8 years ago

Investigating this issue I came to this simple fix in LocalStorageEmitter.ts:37

constructor(@Inject(NgZone) private ngZone: NgZone) {

this fixed error in my first post but now I'm getting No provider for NgZone!

and I have no idea why there is no provider for NgZone and how to fix this *(