我的离子项目有问题。
home.html
<button ion-button block round large style="height: 35px" (click)='Clicked()' [color]="ColorButton">{{ TextButton }}</button>`
home.ts
ColorButton: string = "primary";
TextButton: string = "It's blue !";
Clicked(){
this.ColorButton = "danger";
this.TextButton = "It's now red !"
}
但是当我点击按钮时没有任何反应,我必须改变页面并返回看按钮的变化 我怎样才能让自己改变按钮?
答案 0 :(得分:0)
我没有真正找到解决方案,但我发现了一个替代方案,我设置了我的命令来更改超时功能中的按钮并且它可以正常工作