Skip to content
This repository was archived by the owner on Jun 15, 2024. It is now read-only.

PDFView is not imported by default {N} + angular (nativescript@2.5.2) #15

Closed
echap opened this issue Mar 1, 2017 · 2 comments
Closed

Comments

@echap
Copy link

echap commented Mar 1, 2017

Hi,

Just to inform you that the PDFView is not correctly imported on the project, adding this snippet on main.ts solves the issue :

import {registerElement} from "nativescript-angular/element-registry";
registerElement("PDFView", () => require("nativescript-pdf-view").PDFView);

with nativescript@2.5.2

Cheers,

@echap echap changed the title PDFView is not imported by default {N} angular PDFView is not imported by default {N} + angular (nativescript@2.5.2) Mar 1, 2017
@imaginationcoder
Copy link

Still I am getting below error

npm run start-android-bundle
Module not found: Error: Can't resolve 'nativescript-pdf-view' in '/Users/maisapride7/workspace/KIDSAPP/tingr-ns-app/app'

and app.module.ts contains

registerElement("PDFView", () => require("nativescript-pdf-view").PDFView);

@Merott Merott closed this as completed in 1bf80c7 May 21, 2017
@Merott
Copy link
Owner

Merott commented May 21, 2017

I just released version 2 of this plugin, and have removed the auto-registration of the PDFView element. It's now required to manually do so in your own applications.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants