i require the plugin in js. then i wrote var printer = new Printer()
it says Printer is not a constructor....
solve this error please.............
TypeError: Printer is not a constructor
File: "file:///data/data/org.nativescript.preview/files/app/views/shared/view-models/sub-product-view-model.js, line: 116, column: 18
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:983)
at com.tns.Runtime.callJSMethod(Runtime.java:970)
at com.tns.Runtime.callJSMethod(Runtime.java:954)
at com.tns.Runtime.callJSMethod(Runtime.java:946)
at com.tns.gen.java.lang.Object_button_19_32_ClickListenerImpl.onClick(Object_button_19_32_ClickListenerImpl.java:17)
at android.view.View.performClick(View.java:5215)
at android.view.View$PerformClick.run(View.java:21193)
at android.os.Handler.handleCallback(Handler.java:742)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5571)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
i require the plugin in js. then i wrote var printer = new Printer() it says Printer is not a constructor.... solve this error please.............
TypeError: Printer is not a constructor File: "file:///data/data/org.nativescript.preview/files/app/views/shared/view-models/sub-product-view-model.js, line: 116, column: 18
StackTrace: Frame: function:'SubProductListViewModel.viewModel.camera', file:'file:///data/data/org.nativescript.preview/files/app/views/shared/view-models/sub-product-view-model.js', line: 116, column: 19 Frame: function:'exports.camera', file:'file:///data/data/org.nativescript.preview/files/app/views/itemDetails/itemDetails.js', line: 30, column: 16 Frame: function:'Observable.notify', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/data/observable/observable.js', line: 110, column: 23 Frame: function:'Observable._emit', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/data/observable/observable.js', line: 127, column: 18 Frame: function:'ClickListenerImpl.onClick', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/button/button.js', line: 26, column: 23
at com.tns.Runtime.callJSMethodNative(Native Method) at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1101) at com.tns.Runtime.callJSMethodImpl(Runtime.java:983) at com.tns.Runtime.callJSMethod(Runtime.java:970) at com.tns.Runtime.callJSMethod(Runtime.java:954) at com.tns.Runtime.callJSMethod(Runtime.java:946) at com.tns.gen.java.lang.Object_button_19_32_ClickListenerImpl.onClick(Object_button_19_32_ClickListenerImpl.java:17) at android.view.View.performClick(View.java:5215) at android.view.View$PerformClick.run(View.java:21193) at android.os.Handler.handleCallback(Handler.java:742) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:157) at android.app.ActivityThread.main(ActivityThread.java:5571) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)