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

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

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