phenomnomnominal / angular-2-local-storage

LocalStorageService for Angular 2 with the same API as angular-local-storage
MIT License
93 stars 49 forks source link

TypeError: (intermediate value).share is not a function #51

Closed rodrigoreal closed 6 years ago

rodrigoreal commented 6 years ago

I'm getting this error after i update to angular 5: ERROR TypeError: (intermediate value).share is not a function at new LocalStorageService (local-storage.service.js:45)

The error is at this line: this.errors$ = new Observable_1.Observable(function (observer) { return _this.errors = observer; }).share();

Anyone have any idea why it is happening?

phenomnomnominal commented 6 years ago

Hi there, this has nothing to do with this library, but it looks like you haven't imported the share operator:

import 'rxjs/add/operator/share';