File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed
Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,21 @@ npm install --save ngx-diff2html
3939 export class AppModule {}
4040```
4141
42- ** 2** . Add the following line to ` polyfills.ts ` :
42+ ** 2** . Import diff2html css in ` styles.css ` :
43+
44+ ``` diff
45+ /* You can add global styles to this file, and also import other style files */
46+ + @import "~diff2html/dist/diff2html.min.css";
47+ ```
48+
49+ ** 3** . Add the following line to ` polyfills.ts ` :
4350
4451``` diff
4552 // Add global to window, assigning the value of window itself.
4653+ (window as any).global = window;
4754```
4855
49- ** 3 ** . Start using the component:
56+ ** 4 ** . Start using the component:
5057
5158``` html
5259<ngx-diff2html
@@ -67,7 +74,7 @@ npm install --save ngx-diff2html
6774| -------------------- | ----------------- | ------------------------------------ | --------------------------
6875| left | string | Yes | First text to be compared
6976| right | string | Yes | Second text to be compared
70- | filename | string | Optional, default: ` ` (white space) | Can be used to display a filename in the top of diff results. ** Cannot be null or empty **
77+ | filename | string | Optional, default: `` (empty) | Can be used to display a filename at the top of diff results.
7178| format | ` DiffFormat ` | Optional, default: ` side-by-side ` | Possible values:<br > - ` side-by-side ` <br > - ` line-by-line `
7279| style | ` DiffStyle ` | Optional, default: ` word ` | Possible values:<br > - ` word ` <br > - ` char `
7380
Original file line number Diff line number Diff line change @@ -39,14 +39,21 @@ npm install --save ngx-diff2html
3939 export class AppModule {}
4040```
4141
42- ** 2** . Add the following line to ` polyfills.ts ` :
42+ ** 2** . Import diff2html css in ` styles.css ` :
43+
44+ ``` diff
45+ /* You can add global styles to this file, and also import other style files */
46+ + @import "~diff2html/dist/diff2html.min.css";
47+ ```
48+
49+ ** 3** . Add the following line to ` polyfills.ts ` :
4350
4451``` diff
4552 // Add global to window, assigning the value of window itself.
4653+ (window as any).global = window;
4754```
4855
49- ** 3 ** . Start using the component:
56+ ** 4 ** . Start using the component:
5057
5158``` html
5259<ngx-diff2html
@@ -67,7 +74,7 @@ npm install --save ngx-diff2html
6774| -------------------- | ----------------- | ------------------------------------ | --------------------------
6875| left | string | Yes | First text to be compared
6976| right | string | Yes | Second text to be compared
70- | filename | string | Optional, default: ` ` (white space) | Can be used to display a filename in the top of diff results. ** Cannot be null or empty **
77+ | filename | string | Optional, default: `` (empty) | Can be used to display a filename at the top of diff results.
7178| format | ` DiffFormat ` | Optional, default: ` side-by-side ` | Possible values:<br > - ` side-by-side ` <br > - ` line-by-line `
7279| style | ` DiffStyle ` | Optional, default: ` word ` | Possible values:<br > - ` word ` <br > - ` char `
7380
You can’t perform that action at this time.
0 commit comments