Skip to content

Commit 27eb5e9

Browse files
fix(ui-sref-active): Add CSS class immediately (avoid delay)
- a timeout is used to allow the CSS class to be added in an ng-repeat, where angular resets the class="" attr from the expression - also add the class without a timeout, to avoid flicker Closes #2503
1 parent 4723fb5 commit 27eb5e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ng1/directives/stateDirectives.ts

+1
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ let uiSrefActive = ['$state', '$stateParams', '$interpolate', '$transitions', '$
461461
}
462462

463463
function addClass(el: IAugmentedJQuery, className: string) {
464+
el.addClass(className);
464465
$timeout(function () {
465466
el.addClass(className);
466467
});

0 commit comments

Comments
 (0)