A Diff-Match-Patch component for your Angular 2 + applications
npm install ng-diff-match-atlasNg-Diff-Match-Atlas
=====================

在 angular-diff-match-patch 的基础上添加了add 和del.
~~~
npm install ng-diff-match-atlas --save-dev
~~~
In order to use these directives you'll first have to import them from the module like so:
~~~
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
// import our necessary module and components here
import { DiffMatchPatchModule } from 'ng-diff-match-atlas';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
DiffMatchPatchModule
],
providers: [ ],
bootstrap: [AppComponent]
})
export class AppModule { }
~~~
Remember to add ``DiffMatchPatchModule`` to your imports array in @NgModule
~~~
This should produce something like so:
~~~
ins{
color: black;
background: #bbffbb;
}
del{
color: black;
background: #ffbbbb;
}
~~~
Got any improvements you'd like to make to this module? Submit a pull request and I will review and merge.