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:

URL parameters with React Router

 https://ui.dev/react-router-url-parameters If you're reading this, you're probably familiar with the idea of function parameters. T...