Skip to content

Commit

Permalink
Merge pull request #35 from selemxmn/1.2.0-beta.2
Browse files Browse the repository at this point in the history
1.2.0 beta.2
  • Loading branch information
selemxmn committed May 16, 2019
2 parents c7eb710 + 2f5ffbb commit 109f1fd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
20 changes: 7 additions & 13 deletions README.md
@@ -1,4 +1,4 @@
[![](https://badgen.net/npm/dt/ngx-print)](https://www.npmjs.com/package/ngx-print) [![](https://travis-ci.org/selemxmn/ngx-print.svg?branch=master)](https://travis-ci.org/selemxmn/ngx-print) [![Coverage Status](https://coveralls.io/repos/github/selemxmn/ngx-print/badge.svg?branch=unit-tests)](https://coveralls.io/github/selemxmn/ngx-print?branch=unit-tests) ![](https://img.shields.io/david/selemxmn/ngx-print.svg) ![](https://img.shields.io/david/dev/selemxmn/ngx-print.svg)
[![](https://badgen.net/npm/dt/ngx-print)](https://www.npmjs.com/package/ngx-print) [![](https://travis-ci.org/selemxmn/ngx-print.svg?branch=master)](https://travis-ci.org/selemxmn/ngx-print) [![Coverage Status](https://coveralls.io/repos/github/selemxmn/ngx-print/badge.svg?branch=unit-tests)](https://coveralls.io/github/selemxmn/ngx-print?branch=unit-tests) ![](https://img.shields.io/david/selemxmn/ngx-print.svg)

# ngx-print : *plug n' play Angular (2++) directive to print your stuff*
This directive makes printing your HTML sections smooth and easy in your Angular application. It is inspired from the old [AngularJS ngPrint](https://github.com/gilf/ngPrint) directive, thus it is intendend to be used with the new Angular -2/4/5/6/7-... ***Enjoy ! contributions are so welcomed :)***
Expand Down Expand Up @@ -94,7 +94,7 @@ export class YourAppModule {

Here some simple styles were added to every `h1` & `h2` tags within the `div` where `print-section` is tagged to its `id` attribute.

- If you would like to use your existing CSS with media print you can add the `useExistingCss` attribute:
- If you would like to use your existing CSS with media print you can add the `useExistingCss` attribute:

```html

Expand All @@ -105,8 +105,7 @@ Here some simple styles were added to every `h1` & `h2` tags within the `div` wh
</div>

<button
[printStyle]="{h1 : {'color': 'red'}, h2 : {'border': 'solid 1px'}}"
[useExistingCss]="true"
[useExistingCss]="true"
printSectionId="print-section"
ngxPrint>print</button>

Expand All @@ -124,19 +123,14 @@ Here some simple styles were added to every `h1` & `h2` tags within the `div` wh
</div>

<button
styleSheetFile="assets/css/custom1.css,assets/css/custom2.css"
printSectionId="print-section"
ngxPrint>print</button>
styleSheetFile="assets/css/custom1.css,assets/css/custom2.css"
printSectionId="print-section"
ngxPrint>print</button>

```
## Contributors :1st_place_medal:

Huge thanks to: [deeplotia](https://github.com/deeplotia) , [Ben L](https://github.com/broem) , [Gavyn McKenzie](https://github.com/gavmck) and to all `ngx-print` users

## TODO
* Disable the print button once the popped window is opened
* Write tests
* ...
Huge thanks to: [deeplotia](https://github.com/deeplotia) , [Ben L](https://github.com/broem) , [Gavyn McKenzie](https://github.com/gavmck) , [silenceway](https://github.com/silenceway) and to all `ngx-print` users

## Donation

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ngx-print",
"version": "1.2.0-beta.1",
"version": "1.2.0-beta.2",
"description": "Plug n' Play Angular (2++) directive to print your stuff",
"author": "https://github.com/selemxmn/ngx-print/graphs/contributors",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ngx-print.directive.ts
Expand Up @@ -108,7 +108,7 @@ public returnStyleValues() {
*/
@HostListener('click')
public print(): void {
let printContents, popupWin, styles, links;
let printContents, popupWin, styles = '', links = '';

if(this.useExistingCss) {
styles = this.getElementTag('style');
Expand Down

0 comments on commit 109f1fd

Please sign in to comment.