Index: third_party/pkg/angular/lib/directive/ng_show_hide.dart |
diff --git a/third_party/pkg/angular/lib/directive/ng_show_hide.dart b/third_party/pkg/angular/lib/directive/ng_show_hide.dart |
index 560cfce76434ca8ddd27bc83536638468104f12c..5eee8dae1d33b20806e1891b5b7a71d679639615 100644 |
--- a/third_party/pkg/angular/lib/directive/ng_show_hide.dart |
+++ b/third_party/pkg/angular/lib/directive/ng_show_hide.dart |
@@ -5,21 +5,22 @@ part of angular.directive; |
* 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( |
+@Decorator( |
selector: '[ng-hide]', |
map: const {'ng-hide': '=>hide'}) |
-class NgHideDirective { |
+class NgHide { |
static String NG_HIDE_CLASS = 'ng-hide'; |
final dom.Element element; |
+ final Animate animate; |
- NgHideDirective(this.element); |
+ NgHide(this.element, this.animate); |
set hide(value) { |
if (toBool(value)) { |
- element.classes.add(NG_HIDE_CLASS); |
+ animate.addClass(element, NG_HIDE_CLASS); |
} else { |
- element.classes.remove(NG_HIDE_CLASS); |
+ animate.removeClass(element, NG_HIDE_CLASS); |
} |
} |
} |
@@ -29,19 +30,20 @@ class NgHideDirective { |
* 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( |
+@Decorator( |
selector: '[ng-show]', |
map: const {'ng-show': '=>show'}) |
-class NgShowDirective { |
+class NgShow { |
final dom.Element element; |
+ final Animate animate; |
- NgShowDirective(this.element); |
+ NgShow(this.element, this.animate); |
set show(value) { |
if (toBool(value)) { |
- element.classes.remove(NgHideDirective.NG_HIDE_CLASS); |
+ animate.removeClass(element, NgHide.NG_HIDE_CLASS); |
} else { |
- element.classes.add(NgHideDirective.NG_HIDE_CLASS); |
+ animate.addClass(element, NgHide.NG_HIDE_CLASS); |
} |
} |
} |