0.0.7 • Published 2 years ago

ngx-simple-text-diff v0.0.7

Weekly downloads
68
License
-
Repository
github
Last release
2 years ago

NgxSimpleTextDiff

Angular 2+ implementation of the diff library for displaying diffs of text. https://www.npmjs.com/package/diff

Quickstart

  1. Install ngx-simple-text-diff from npm
npm i ngx-simple-text-diff
  1. Include the diff.js script

    in angular.json:

...
	"scripts": ["./node_modules/diff/dist/diff.min.js"]
...
  1. Import NgxDiffModule to your app:

    import { BrowserModule } from '@angular/platform-browser';
    import { NgModule } from '@angular/core';
    import { NgxSimpleTextDiffModule } from 'ngx-simple-text-diff';
    import { AppComponent } from './app.component';
    
    @NgModule({
      declarations: [
        AppComponent
      ],
      imports: [
        BrowserModule,
        NgxSimpleTextDiffModule
      ],
      providers: [],
      bootstrap: [AppComponent]
    })
    export class AppModule { }
  2. Use the lib-ngx-simple-text-diff component by setting the oldText and newText attributes:

    <lib-ngx-simple-text-diff [oldText]="oldDocumentContents" [newText]="newDocumentContents"></lib-ngx-simple-text-diff>
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago