Skip to content

Commit

Permalink
Merge pull request #183 from selemxmn/documentationUpdates
Browse files Browse the repository at this point in the history
Documentation updates
  • Loading branch information
Core121 committed Jan 5, 2024
2 parents c801356 + 1dcf177 commit b63de61
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,16 @@ Here some simple styles were added to every `h1` & `h2` tags within the `div` wh
ngxPrint>print</button>

```
## Using NgxPrint as a service

- To print in a new tab rather than a new window set the property `openNewTab` to true. By default `openNewTab` is false and ngxPrint will open a new print window.

```html
<button
[openNewTab]="true"
ngxPrint>print</button>
```

## Using NgxPrint as a service (v1.5+)
Inject the NgxPrintService in the constructor of your component or service:

```typescript
Expand All @@ -214,6 +223,7 @@ The print options object allows you to specify how the print job should be handl
printTitle: string = null;
useExistingCss: boolean = false;
bodyClass: string = '';
openNewTab: boolean = false;
previewOnly: boolean = false;
closeWindow: boolean = true;
printDelay: number = 0;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-print",
"version": "1.5.0",
"version": "1.5.1",
"description": "Plug n' Play Angular (2++) directive to print your stuff",
"author": "https://github.com/selemxmn/ngx-print/graphs/contributors",
"repository": {
Expand Down
26 changes: 25 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,11 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"

"@rollup/[email protected]":
version "4.5.1"
resolved "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.5.1.tgz"
integrity sha512-5I3Nz4Sb9TYOtkRwlH0ow+BhMH2vnh38tZ4J4mggE48M/YyJyp/0sPSxhw1UeS1+oBgQ8q7maFtSeKpeRJu41Q==

"@rollup/wasm-node@^4.5.0":
version "4.5.1"
resolved "https://registry.npmjs.org/@rollup/wasm-node/-/wasm-node-4.5.1.tgz"
Expand Down Expand Up @@ -5460,13 +5465,32 @@ rimraf@^3.0.0, rimraf@^3.0.2:
dependencies:
glob "^7.1.3"

rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^2.78.0||^3.0.0||^4.0.0, rollup@^3.27.1, rollup@^4.5.0:
rollup@^1.20.0||^2.0.0||^3.0.0||^4.0.0, rollup@^2.78.0||^3.0.0||^4.0.0, rollup@^3.27.1:
version "3.29.4"
resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz"
integrity sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==
optionalDependencies:
fsevents "~2.3.2"

rollup@^4.5.0:
version "4.5.1"
resolved "https://registry.npmjs.org/rollup/-/rollup-4.5.1.tgz"
integrity sha512-0EQribZoPKpb5z1NW/QYm3XSR//Xr8BeEXU49Lc/mQmpmVVG5jPUVrpc2iptup/0WMrY9mzas0fxH+TjYvG2CA==
optionalDependencies:
"@rollup/rollup-android-arm-eabi" "4.5.1"
"@rollup/rollup-android-arm64" "4.5.1"
"@rollup/rollup-darwin-arm64" "4.5.1"
"@rollup/rollup-darwin-x64" "4.5.1"
"@rollup/rollup-linux-arm-gnueabihf" "4.5.1"
"@rollup/rollup-linux-arm64-gnu" "4.5.1"
"@rollup/rollup-linux-arm64-musl" "4.5.1"
"@rollup/rollup-linux-x64-gnu" "4.5.1"
"@rollup/rollup-linux-x64-musl" "4.5.1"
"@rollup/rollup-win32-arm64-msvc" "4.5.1"
"@rollup/rollup-win32-ia32-msvc" "4.5.1"
"@rollup/rollup-win32-x64-msvc" "4.5.1"
fsevents "~2.3.2"

run-async@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz"
Expand Down

0 comments on commit b63de61

Please sign in to comment.