Dart Documentationangular.directiveNgShowDirective

NgShowDirective class

The ngShow 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-show]',
   map: const {'ng-show': '=>show'})
class NgShowDirective {
 static String NG_SHOW_CLASS = 'ng-show';

 dom.Element element;

 NgShowDirective(dom.Element this.element);

 set show(value) {
   if (toBool(value)) {
     element.classes.add(NG_SHOW_CLASS);
   } else {
     element.classes.remove(NG_SHOW_CLASS);
   }
 }
}

Static Properties

String NG_SHOW_CLASS #

static String NG_SHOW_CLASS = 'ng-show'

Constructors

new NgShowDirective(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
NgShowDirective(dom.Element this.element);

Properties

Element element #

dom.Element element

dynamic set show(value) #

set show(value) {
 if (toBool(value)) {
   element.classes.add(NG_SHOW_CLASS);
 } else {
   element.classes.remove(NG_SHOW_CLASS);
 }
}