@kovalenko/print-element
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

PrintElement

Prints selected element only

Installation

npm install @kovalenko/print-element

First, import the PrintElementModule to your module:

import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {PrintElementModule} from '@kovalenko/print-element';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {AppComponent} from './app';

@NgModule({
  imports: [
    BrowserModule,
    PrintElementModule
  ],
  declarations: [AppComponent],
  bootstrap: [AppComponent],
})
export class AppModule {
}

platformBrowserDynamic().bootstrapModule(AppModule);

Then use the directive to print an element:

import {Component} from '@angular/core';
import {MainMenuService} from '@kovalenko/main-menu';

@Component({
  selector: 'app',
  template: `
    <button [ngcPrintElement]="printable"></button>
    <div #printable>
      Printable element
    </div>
  `,
})
export class AppComponent { }

Directive

Selector: [ngcPrintElement]

Properties

Name Description
@Input() ngcPrintElement: HTMLElement printable element

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @kovalenko/print-element

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

25.5 kB

Total Files

14

Last publish

Collaborators

  • kovalenko