Skip to content

Commit d191d80

Browse files
committed
Update demo app
1 parent 56818ba commit d191d80

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

projects/demo/src/app/app.component.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@
3131
</nz-radio-group>
3232
</div>
3333
</div>
34-
<ngx-diff2html [left]="leftContent" [right]="rightContent" [format]="outputFormat" [style]="diffStyle" ></ngx-diff2html>
34+
<ngx-diff2html
35+
[left]="leftContent"
36+
[right]="rightContent"
37+
[format]="outputFormat"
38+
[style]="diffStyle"
39+
(diffChange)="onDiffChange($event)"
40+
></ngx-diff2html>
3541
</div>
3642
</nz-content>
3743
<nz-footer>Made with <span class="heart">♥️</span> by <a href="https://github.com/AXeL-dev" target="_blank">AXeL</a></nz-footer>

projects/demo/src/app/app.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ export class AppComponent {
2222
}`;
2323
diffStyle: 'word' | 'char' = 'word';
2424
outputFormat: 'side-by-side' | 'line-by-line' = 'line-by-line';
25+
26+
onDiffChange(diff: string) {
27+
console.log(diff);
28+
}
2529
}

projects/demo/src/styles.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/* You can add global styles to this file, and also import other style files */
2+
3+
@import "~diff2html/dist/diff2html.min.css";

0 commit comments

Comments
 (0)