Implement feedback for "save" button

This commit is contained in:
Kristóf Tóth
2018-02-09 13:43:08 +01:00
parent 5ed4c0b428
commit 9030df0a2b
3 changed files with 9 additions and 2 deletions

View File

@ -7,7 +7,7 @@
</button>
</div>
<div
<div (textChanged)="saved = false"
ace-editor
[(text)]="code"
[(mode)]="language"
@ -16,4 +16,8 @@
>
</div>
<button (click)="sendCode()" type="submit" class="btn btn-secondary">Save</button>
<button (click)="sendCode()"
type="submit"
class="btn btn-secondary"
[class.btn-success]="saved === true"
>Save<span *ngIf="saved === true">d!</span></button>