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:

StaticImage

  import React , { useEffect , useRef } from "react" import { StaticImage } from "gatsby-plugin-image" impor...