Hii guys. I have event for deleting data when user clicks X icon for deleting data, data are deleted succesfully and displays status DELETED, remember the default status is UNDELETED, what I want is when status is DELETED the X icon for deleting data should be hidden but if its not deleted X icon should be visible.
here is what I have done so far <!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <body> <div ng-app="myApp" ng-controller="myCtrl"> <a ng-click =vm.deleteData() <i class="fa fa-times><i> <label ng-show="vm.isVisible"> {{dataStatus}}</label> </div> <script> var app = angular.module('myApp', []); app.controller('myCtrl', function($scope) { vm.isVisible =false; $scope.deleteData = function() { if(vm.dataStatus !== "DELETED") { vm.isVisible = true; } else { vm.isVisible = false } }; }); </script> This just hide X icon , what wrong am I doing here? help please -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
