if someProperty exists then add .my-class else remove it.
If the css class name in the ng-class is dash separated then you need to define it as string like .. ng-class="'my-class' : .. else you can define it as string or not as .. ng-class="myClass : ..
Expression pass the [ng-style][2] evals to an object whose keys are CSS style names and values are corresponding values for those CSS keys.
EX:
.. ng-style="{_key_ : _value_}" ... => _key_ is the css property while _value_ set the property value. Ex => .. ng-style="{color : 'red'}" ...
If your using something like background-color then its not a valid key of a object then it needs to be quoted as .. ng-style="{'background-color' : 'red'}" ... same as ng-class.
$scope.disableTagButton = {'visibility': 'hidden'}; // then button will hidden.
$scope.disableTagButton = {'visibility': 'visible'}; // then button will visible.
so u can change the visibility of the button by changing the $scope.disableTagButton.
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app='MyModule' ng-controller='MyController'>
<button visible='showButton'>Button that can be invisible</button>
<button ng-click='showButton = !showButton'>Hide it or show it</button>
</div>
All you need is to assign the class hg-hide-animate to the element
/* style your element(s) at least for selector.ng-hide */
/* in this case your selector is #tagBtnId */
#tagBtnId.ng-hide {
/*visibility:hidden;*/
opacity: 0;
transition: opacity 1s ease-in;
}
#tagBtnId {
/*visibility:initial;*/
opacity: 1;
transition: opacity 1s ease-out;
}
(function() {
angular.module('app', []).controller('controller', Controller);
/* @ngInject */
function Controller($s) {var THIS = this;THIS.disableTagButton = false;}
Controller.$inject = ['$scope'];
})();
/* style your element(s) at least for selector.ng-hide */
/* in this case your selector is #tagBtnId */
#tagBtnId.ng-hide {
/*visibility:hidden;*/
opacity: 0;
transition: opacity 1s ease-in;
}
#tagBtnId {
/*visibility:initial;*/
opacity: 1;
transition: opacity 1s ease-out;
}