Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit de21f4d

Browse files
committed
fix(NgA): Do not cause a scope digect
Fixes #810
1 parent 9d3bdf7 commit de21f4d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/directive/ng_a.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ part of angular.directive;
1717
class NgADirective {
1818
final dom.Element element;
1919

20-
NgADirective(this.element) {
20+
NgADirective(this.element, NgZone zone) {
2121
if (element.attributes["href"] == "") {
22-
element.onClick.listen((event) {
23-
if (element.attributes["href"] == "") {
24-
event.preventDefault();
25-
}
22+
zone.runOutsideAngular(() {
23+
element.onClick.listen((event) {
24+
if (element.attributes["href"] == "") {
25+
event.preventDefault();
26+
}
27+
});
2628
});
2729
}
2830
}

0 commit comments

Comments
 (0)