Skip to content

Commit de72c06

Browse files
committed
Update README
1 parent 7cd48c3 commit de72c06

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# NgxDiff2html
22

3+
[![NPM version](https://img.shields.io/npm/v/ngx-diff2html)](https://www.npmjs.com/package/ngx-diff2html)
4+
[![Downloads](https://img.shields.io/npm/dt/ngx-diff2html)](https://npmjs.org/package/ngx-diff2html)
5+
[![License](https://img.shields.io/npm/l/ngx-diff2html)](LICENSE)
6+
37
A simple text diff component for Angular, based on [diff-match-patch](https://github.com/google/diff-match-patch) & [diff2html](https://github.com/rtfpessoa/diff2html).
48

59
## Demo
@@ -36,7 +40,7 @@ npm install --save ngx-diff2html
3640

3741
## Usage
3842

39-
1) Register the `NgxDiff2htmlModule` in a module, for example app module:
43+
**1**. Register the `NgxDiff2htmlModule` in a module, for example app module:
4044

4145
```diff
4246
import { BrowserModule } from '@angular/platform-browser';
@@ -57,20 +61,20 @@ npm install --save ngx-diff2html
5761
export class AppModule {}
5862
```
5963

60-
2) Add the following line to `polyfills.ts`:
64+
**2**. Add the following line to `polyfills.ts`:
6165

6266
```diff
6367
// Add global to window, assigning the value of window itself.
6468
+ (window as any).global = window;
6569
```
6670

67-
3) Start using the component:
71+
**3**. Start using the component:
6872

6973
```
7074
<ngx-diff2html
7175
left="some text"
7276
right="some other text"
73-
/>
77+
></ngx-diff2html>
7478
```
7579

7680
## Build

projects/ngx-diff2html/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# NgxDiff2html
22

3+
[![NPM version](https://img.shields.io/npm/v/ngx-diff2html)](https://www.npmjs.com/package/ngx-diff2html)
4+
[![Downloads](https://img.shields.io/npm/dt/ngx-diff2html)](https://npmjs.org/package/ngx-diff2html)
5+
[![License](https://img.shields.io/npm/l/ngx-diff2html)](LICENSE)
6+
37
A simple text diff component for Angular, based on [diff-match-patch](https://github.com/google/diff-match-patch) & [diff2html](https://github.com/rtfpessoa/diff2html).
48

59
## Demo
@@ -36,7 +40,7 @@ npm install --save ngx-diff2html
3640

3741
## Usage
3842

39-
1) Register the `NgxDiff2htmlModule` in a module, for example app module:
43+
**1**. Register the `NgxDiff2htmlModule` in a module, for example app module:
4044

4145
```diff
4246
import { BrowserModule } from '@angular/platform-browser';
@@ -57,20 +61,20 @@ npm install --save ngx-diff2html
5761
export class AppModule {}
5862
```
5963

60-
2) Add the following line to `polyfills.ts`:
64+
**2**. Add the following line to `polyfills.ts`:
6165

6266
```diff
6367
// Add global to window, assigning the value of window itself.
6468
+ (window as any).global = window;
6569
```
6670

67-
3) Start using the component:
71+
**3**. Start using the component:
6872

6973
```
7074
<ngx-diff2html
7175
left="some text"
7276
right="some other text"
73-
/>
77+
></ngx-diff2html>
7478
```
7579

7680
## Build

0 commit comments

Comments
 (0)