TEXTO DE TOLE
<a class="btn btn-primary" (click)="isFreeze = !isFreeze">
<i class="fa fa-plus-circle"></i>
{{isFreeze ? "Unfreeze" : "Freeze and Save"}}
</a>
Balo
<a class="btn btn-primary" (click)="isFreeze = !isFreeze">
<i class="fa fa-plus-circle"></i>
{{isFreeze ? "Unfreeze" : "Freeze and Save"}}
</a>
<a class="btn pull-right"
ng-class="{true: 'btn-primary', false: 'btn-danger'}[!patient.archived]"
ng-click="patient.archived = !patient.archived">
{{!patient.archived && 'Archive' || 'Unarchive'}} patient
</a>
$scope.toggleButton = { inAddState: true };
$scope.update = (id, button) => {
if (button.inAddState) {
// logic to add
} else {
// logic to remove
}
// make sure you switch the state of the button at some point
button.inAddState = !button.inAddState;
}
<button ng-click="update(data.id, toggleButton)"
class="btn {{ toggleButton.inAddState ? 'btn-primary' : 'btn-warning' }}"
ng-bind="toggleButton.inAddState ? 'Add' : 'Remove'">
</button>