nativescript-printer
nativescript-printer copied to clipboard
Usage with angular, printScreen does not work without view arg
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.