Dart Documentationangular.directiveNgHideDirective

NgHideDirective class

The ngHide directive shows or hides the given HTML element based on the expression provided to the ngHide attribute. The element is shown or hidden by changing the removing or adding the ng-hide CSS class onto the element.

@NgDirective(
   selector: '[ng-hide]',
   map: const {'ng-hide': '=>hide'} )
class NgHideDirective {
 static String NG_HIDE_CLASS = 'ng-hide';

 dom.Element element;

 NgHideDirective(dom.Element this.element);

 set hide(value) {
   if (toBool(value)) {
     element.classes.add(NG_HIDE_CLASS);
   } else {
     element.classes.remove(NG_HIDE_CLASS);
   }
 }
}

Static Properties

String NG_HIDE_CLASS #

static String NG_HIDE_CLASS = 'ng-hide'

Constructors

new NgHideDirective(Element element) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
NgHideDirective(dom.Element this.element);

Properties

Element element #

dom.Element element

dynamic set hide(value) #

set hide(value) {
 if (toBool(value)) {
   element.classes.add(NG_HIDE_CLASS);
 } else {
   element.classes.remove(NG_HIDE_CLASS);
 }
}