EddyVerbruggen / EddyVerbruggen/nativescript-printer

Usage with angular, printScreen does not work without view arg

Open
#15 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Hello, it looks like printScreen() without any view arg doesn't work in angular based projects. `let view: View = frame.topmost().currentPage.content;` ends up being undefined. Passing the view explicitly works but has no example. This works:

```
@ViewChild("foo") foo: ElementRef;
printer.printScreen({ view: this.foo.nativeElement });
```

I could submit a PR just updating the documentation if you'd like. If we wanted to not fix the currentPage issue, we could just note that the view arg is required when using Angular.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.