Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

change button text dynamically angular 6

//html code
<button (click)="changevalue()" id="addnum">{{num}}</button>

//typescript code
num:number=0 //declare var
changevalue() { 
num=num+1
}
 
PREVIOUS NEXT
Tagged: #change #button #text #dynamically #angular
ADD COMMENT
Topic
Name
2+4 =