Skip to content

Commit 97d3e96

Browse files
committed
fix(uiSref): eval click events before transition
- Fixes #558
1 parent 8612380 commit 97d3e96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/stateDirectives.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ function $StateRefDirective($state) {
4747
var button = e.which || e.button;
4848

4949
if ((button == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
50-
$state.go(ref.state, params, { relative: base });
51-
scope.$apply();
50+
scope.$evalAsync(function() {
51+
$state.go(ref.state, params, { relative: base });
52+
});
5253
e.preventDefault();
5354
}
5455
});

0 commit comments

Comments
 (0)