yfj-ngx-print-file v1.0.2
YfjNgxPrintFile
Angular directive to print files in a new tab. Please, refer to the demo app here
Usage
Install package
npm i yfj-ngx-print-fileImport
YfjNgxPrintFileModulemodule into your appimport { YfjNgxPrintFileModule } from 'yfj-ngx-print-file'; @NgModule({ ... imports: [YfjNgxPrintFileModule, ...], ... }) export class AppModule { }Use
[yfjNgxPrintFile]="yourObservableReturningBlob()"to print your file<button [yfjNgxPrintFile]="getFile()">Print file</button>
This library was generated with Angular CLI version 12.2.0.
Code scaffolding
Run ng generate component component-name --project yfj-ngx-print-file to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project yfj-ngx-print-file.
Note: Don't forget to add
--project yfj-ngx-print-fileor else it will be added to the default project in yourangular.jsonfile.
Build
Run ng build yfj-ngx-print-file to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
After building your library with ng build yfj-ngx-print-file, go to the dist folder cd dist/yfj-ngx-print-file and run npm publish.
Running unit tests
Run ng test yfj-ngx-print-file to execute the unit tests via Jest.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.