Issues with Ionic
If i inject the LocalStorageService from import {LocalStorageService} from "angular2-localstorage/LocalStorageEmitter";
i receive
/project $ ionic serve
Running 'serve:before' gulp task before serve
[09:35:56] Starting 'clean'...
[09:35:56] Finished 'clean' after 12 ms
[09:35:56] Starting 'watch'...
[09:35:56] Starting 'sass'...
[09:35:56] Starting 'html'...
[09:35:56] Starting 'fonts'...
[09:35:56] Starting 'scripts'...
[09:35:56] Finished 'scripts' after 26 ms
[09:35:56] Finished 'html' after 33 ms
[09:35:56] Finished 'fonts' after 33 ms
[09:35:56] Finished 'sass' after 619 ms
/project/node_modules/angular2-localstorage/LocalStorageEmitter.ts:1
import {Injectable, OnDestroy} from "@angular/core";
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
You should post issues with Ionic in the ionic repo. This library is a regular Typescript library, you need to include in your build routine. I have no idea about Ionic's typescript use.
hey @marcj thanks for your response. Sorry my typescript skills are limited. Can't i now just use npm install and then use import {LocalStorageService} from "angular2-localstorage/LocalStorageEmitter"; ?
Angular2-localstorage is the best implementation i found for ng2. But noobs as me need to get it up and running u knwo? :)
Got the same issue here. I guess it's because the gulp toolchain is not transpiling node modules. At the moment, I just took the source files (.ts) in my own project folder...
@Renader @VinceOPS have you fixed your problem? I'm also getting the ParseError
Me too..any update?