0.0.5 • Published 4 years ago

ngx-simple-print v0.0.5

Weekly downloads
28
License
-
Repository
github
Last release
4 years ago

NgxSimplePrint

This is a simple directive to print html section with angular.

DEMO

Try the Demo

Installation

npm install ngx-simple-print --save

Usage

Import the module into your app.module.ts file.

import { NgxSimplePrintModule } from 'nx-simple-print';

@NgModule({
  imports: [ NgxSimplePrintModule ]
})
export class AppModule {
}

And you can use the directive in your app

import { Component } from '@angular/core';

@Component({
  selector: 'app',
  template: `
    <button
        roNgxSimplePrint
        [printContentId]="'contentToPrint'"
    >Print</button>
    <div id="contentToPrint">
        my printable content...
    </div>
  `,
})
export class AppComponent {
}