I have 2 variables that manipulate the same image
In the html:
<i class="fa fa-trash-o" aria-hidden="true" ng-click="vm.deleteMessage()" ng-show="!vm.instance.deleted" ng-show="!vm.flagDelete"></i>
but it never changes, what is my mistake?
I have 2 variables that manipulate the same image
In the html:
<i class="fa fa-trash-o" aria-hidden="true" ng-click="vm.deleteMessage()" ng-show="!vm.instance.deleted" ng-show="!vm.flagDelete"></i>
but it never changes, what is my mistake?
I'll give you an example in case it helps you in plunkr on how to make it show or not:
http://plnkr.co/edit/AtbVEEm1f7IWlpcFLWha?p=preview
Controller: As you can see, here I use controller as:
Html: here I also use controllerAs:
In addition to this, I added two ways to change the value of the variable that controls the visibility.
Another thing I notice in your code is that you have double ng-show, you should only have one, and in case of responding to two variables you should do the following:
either
either
I hope this is what you are looking for, anything ask again.