我为列表的每个组成部分都有一个按钮,单击此按钮时,我想将其交换为另一个按钮,当我第一次单击此按钮时,我正在使用angularJS ng-click进行其他尝试,仅当我重新加载页面,遵循源代码
<button id='btn' type="button" class='btn btn-primary justify-content-between align-items-xl-center'
ng-click="vcl.Participantes = vcl.Participantes + 1;
participarDoSorteio(this);"
ng-init="count=vcl.Participantes">
Participar
</button>
控制器:
adicionarInfos.then(function(d) {
//if (d.status === 201) {
document.getElementById("btn").style.display = 'none';
document.getElementById("part").style.display = 'block';
//}
});