Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Device ionic-native

$
0
0

@kurtommy wrote:

I'm trying to add Device plugin to my app, but with no success. I've already added Geolocation and it works fine. Do I need some typings install ?

this is the plugin http://ionicframework.com/docs/v2/native/Device/

constructor(nav: NavController) {
    this.nav = nav;
    let info = Device.getDevice();
  }

I'm receiving this error:

app.bundle.js:34063 ORIGINAL EXCEPTION: TypeError: ionic_native_1.Device.getDevice is not a functionBrowserDomAdapter.logError @ app.bundle.js:34063ExceptionHandler.call @ app.bundle.js:7831(anonymous function) @ app.bundle.js:17002NgZone._notifyOnError @ app.bundle.js:17661collection_1.StringMapWrapper.merge.onError @ app.bundle.js:17556Zone.run @ app.bundle.js:2262(anonymous function) @ app.bundle.js:17574zoneBoundFn @ app.bundle.js:2235lib$es6$promise$$internal$$tryCatch @ app.bundle.js:1483lib$es6$promise$$internal$$invokeCallback @ app.bundle.js:1495lib$es6$promise$$internal$$publish @ app.bundle.js:1466(anonymous function) @ app.bundle.js:1138microtask @ app.bundle.js:17614Zone.run @ app.bundle.js:2258(anonymous function) @ app.bundle.js:17574zoneBoundFn @ app.bundle.js:2235lib$es6$promise$asap$$flush @ app.bundle.js:1277
app.bundle.js:34063 ORIGINAL STACKTRACE:BrowserDomAdapter.logError @ app.bundle.js:34063ExceptionHandler.call @ app.bundle.js:7834(anonymous function) @ app.bundle.js:17002NgZone._notifyOnError @ app.bundle.js:17661collection_1.StringMapWrapper.merge.onError @ app.bundle.js:17556Zone.run @ app.bundle.js:2262(anonymous function) @ app.bundle.js:17574zoneBoundFn @ app.bundle.js:2235lib$es6$promise$$internal$$tryCatch @ app.bundle.js:1483lib$es6$promise$$internal$$invokeCallback @ app.bundle.js:1495lib$es6$promise$$internal$$publish @ app.bundle.js:1466(anonymous function) @ app.bundle.js:1138microtask @ app.bundle.js:17614Zone.run @ app.bundle.js:2258(anonymous function) @ app.bundle.js:17574zoneBoundFn @ app.bundle.js:2235lib$es6$promise$asap$$flush @ app.bundle.js:1277
app.bundle.js:34063 TypeError: ionic_native_1.Device.getDevice is not a function
    at new Queues (app.bundle.js:63090)
    at app.bundle.js:8085
    at Injector._instantiate (app.bundle.js:6643)
    at Injector._instantiateProvider (app.bundle.js:6597)
    at Injector._new (app.bundle.js:6586)
    at InjectorInlineStrategy.instantiateProvider (app.bundle.js:6086)
    at ElementDirectiveInlineStrategy.init (app.bundle.js:18972)
    at new AppElement (app.bundle.js:18649)
    at HostViewFactory.viewFactory_HostQueues0 [as viewFactory] (viewFactory_HostQueues:122)
    at AppViewManager_.createHostViewInContainer (app.bundle.js:20039)

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>