How to change button text and disable button on click event in angular2

Source: https://stackoverflow.com/questions/41489355/how-to-change-button-text-and-disable-button-on-click-event-in-angular2

<button (click)="setSaving($event.target, 'saving')">save</button>
and then in your component:
setSaving(element, text){
  element.textContent = text;
  element.disabled = true;
}
You can also set the properties using the Renderer

Không có nhận xét nào:

Cold Turkey Blocker

 https://superuser.com/questions/1366153/how-to-get-rid-of-cold-turkey-website-blocker-get-around-the-block Very old question, but still wan...