| Index: third_party/pkg/angular/lib/directive/ng_events.dart
|
| diff --git a/third_party/pkg/angular/lib/directive/ng_events.dart b/third_party/pkg/angular/lib/directive/ng_events.dart
|
| index 5b97a38629b2d41a5cc02859073474669824b319..9141b30679cdb29fb0e325e8bc246b0636d4951f 100644
|
| --- a/third_party/pkg/angular/lib/directive/ng_events.dart
|
| +++ b/third_party/pkg/angular/lib/directive/ng_events.dart
|
| @@ -25,7 +25,6 @@ part of angular.directive;
|
| *
|
| * The full list of supported handlers are:
|
| *
|
| - * - [ng-blur]
|
| * - [ng-abort]
|
| * - [ng-beforecopy]
|
| * - [ng-beforecut]
|
| @@ -131,6 +130,14 @@ part of angular.directive;
|
| @NgDirective(selector: '[ng-transitionend]', map: const {'ng-transitionend': '&onTransitionEnd'})
|
|
|
| class NgEventDirective {
|
| + // Is it better to use a map of listeners or have 29 properties on this
|
| + // object? One would pretty much only assign to one or two of those
|
| + // properties. I'm opting for the map since it's less boilerplate code.
|
| + var listeners = {};
|
| + final dom.Element element;
|
| + final Scope scope;
|
| +
|
| + NgEventDirective(this.element, this.scope);
|
|
|
| // NOTE: Do not use the element.on['some_event'].listen(...) syntax. Doing so
|
| // has two downsides:
|
| @@ -144,9 +151,7 @@ class NgEventDirective {
|
| int key = stream.hashCode;
|
| if (!listeners.containsKey(key)) {
|
| listeners[key] = handler;
|
| - stream.listen((event) => scope.$apply(() {
|
| - handler({r"$event": event});
|
| - }));
|
| + stream.listen((event) => handler({r"$event": event}));
|
| }
|
| }
|
|
|
| @@ -201,13 +206,4 @@ class NgEventDirective {
|
| set onTouchMove(value) => initListener(element.onTouchMove, value);
|
| set onTouchStart(value) => initListener(element.onTouchStart, value);
|
| set onTransitionEnd(value) => initListener(element.onTransitionEnd, value);
|
| -
|
| - // Is it better to use a map of listeners or have 29 properties on this
|
| - // object? One would pretty much only assign to one or two of those
|
| - // properties. I'm opting for the map since it's less boilerplate code.
|
| - var listeners = {};
|
| - dom.Element element;
|
| - Scope scope;
|
| -
|
| - NgEventDirective(this.element, this.scope);
|
| }
|
|
|