Wrapper Angular5 plugin for htmldiff-js
npm install angular5-htmldiff-jsThis project is a Wrapper Angular5 plugin for htmldiff-js (https://www.npmjs.com/package/htmldiff-js)
Usage
-----
#### Install ####
npm install angular5-htmldiff-js --save
#### Html ####
`` Some old html herehtml
Some new html goes here
#### Import ####
`javascriptimport { HtmldiffModule } from './modules/htmldiff/htmldiff.module';
@NgModule({
...,
imports: [
...,
HtmldiffModule
],
providers: [],
bootstrap: [...]
})
`#### Typescript ####
`javascriptngOnInit(): void {
this.oldHtml = document.getElementById('oldHtml');
this.newHtml = document.getElementById('newHtml');
}
`#### CSS ####
`css
.highlight-diff ins {
background-color: #ffff00;
}.highlight-diff del {
background-color: #edb3b3;
}
``