Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ngx-simple-print

josueaqp92890.0.5TypeScript support: included

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

angualar, print, directive, print-directive, ngx-print, print-html, print-section, ngx, printable

readme

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 {
}