visibility hidden in AngularJs?

后端 未结 7 2196
南笙
南笙 2021-02-03 16:45

ng-show applied display: none

7条回答
  •  广开言路
    2021-02-03 17:18

    see https://docs.angularjs.org/api/ng/directive/ngShow the section about Overriding .ng-hide

    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;
    }
    viewmodel={{viewmodel | json}}

提交回复
热议问题