Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: third_party/pkg/angular/lib/directive/ng_show_hide.dart

Issue 257423008: Update all Angular libs (run update_all.sh). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
}
}
« no previous file with comments | « third_party/pkg/angular/lib/directive/ng_repeat.dart ('k') | third_party/pkg/angular/lib/directive/ng_src_boolean.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698