Merott / nativescript-pdf-view

A basic PDF viewer plugin for NativeScript. Now maintained by @madmas: github.com/madmas/nativescript-pdf-view
Other
32 stars 35 forks source link

Erro in Android: Cannot read property OnLoadCompleteListener #28

Closed dariopellegrini closed 6 years ago

dariopellegrini commented 6 years ago

Hello. In iOS works perfectly. In Android it I have this error: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'OnLoadCompleteListener' of undefined

component.ts

import { PDFView } from 'nativescript-pdf-view'; import { registerElement } from 'nativescript-angular'; registerElement('PDFView', () => PDFView);

ngOnInit() { this.path = "https://learn.zu.ac.ae/webapps/dur-browserCheck-bb_bb60/samples/sample.pdf" }

onLoad() { console.log("Loaded") }

component.html <PDFView [src]="path" (load)="onLoad()">

isoengas commented 6 years ago

Same error for me :(

dpdragnev commented 6 years ago

Any resolution to this problem? I am experiencing the same issue.

dpdragnev commented 6 years ago

ok, so I removed the platform and added it again and now I am loading the plugin correctly.

dariopellegrini commented 6 years ago

Confirm: tns platform remove android and then tns run android. This will solve the problem.