Skip to content

Commit 6ae6fe2

Browse files
kasperlewauchristopherthielen
authored andcommitted
fix(uiSrefActive): Apply active classes on lazy loaded states
Conflicts: test/stateDirectivesSpec.js
1 parent cdbe087 commit 6ae6fe2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: src/stateDirectives.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate) {
233233
// Allow uiSref to communicate with uiSrefActive[Equals]
234234
this.$$addStateInfo = function (newState, newParams) {
235235
var state = $state.get(newState, stateContext($element));
236-
if (state) {
237-
states.push({
238-
state: state,
239-
params: newParams
240-
});
241-
update();
242-
}
236+
237+
states.push({
238+
state: state || { name: newState },
239+
params: newParams
240+
});
241+
242+
update();
243243
};
244244

245245
$scope.$on('$stateChangeSuccess', update);

0 commit comments

Comments
 (0)