@omar123456789 wrote:
I am trying to use locale storage service as descried here. http://ionicframework.com/docs/v2/api/platform/storage/LocalStorage/
But i am getting this run-time exception
1 067673 group EXCEPTION: Error during instantiation of MyApp!.
2 067673 error EXCEPTION: Error during instantiation of MyApp!.
3 067673 error ORIGINAL EXCEPTION: TypeError: Illegal constructor
4 067674 error ORIGINAL STACKTRACE:
5 067674 error TypeError: Illegal constructor
at TypeError (native)
at new MyApp (http://localhost:8101/build/js/app.bundle.js:3198:23)
at http://localhost:8101/build/js/app.bundle.js:8088:52
at Injector._instantiate (http://localhost:8101/build/js/app.bundle.js:6646:28)
at Injector._instantiateProvider (http://localhost:8101/build/js/app.bundle.js:6600:26)
at Injector._new (http://localhost:8101/build/js/app.bundle.js:6589:22)
at InjectorInlineStrategy.instantiateProvider (http://localhost:8101/build/js/app.bundle.js:6089:31)
at ElementDirectiveInlineStrategy.init (http://localhost:8101/build/js/app.bundle.js:18975:25)
at new AppElement (http://localhost:8101/build/js/app.bundle.js:18652:29)
at HostViewFactory.viewFactory_HostMyApp0 [as viewFactory] (viewFactory_HostMyApp:73:24)
6 067674 error ERROR CONTEXT:Here is my implementation
`import {App, IonicApp, Platform,LocalStorage} from 'ionic-angular';@App({
template: '',
)export class MyApp {
local; constructor(platform: Platform) { this.local = new Storage(LocalStorage); this.local.set('didTutorial', true); }}
`
Posts: 1
Participants: 1