Skip to content

Commit f0ccd01

Browse files
committed
Update uisref on param changing, not only state
1 parent 525f528 commit f0ccd01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/directives/uiSref.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export class UISref implements OnChanges {
115115

116116
/** @internal */ private _emit = false;
117117
/** @internal */ private _statesSub: Subscription;
118+
/** @internal */ private _paramsSub: Subscription;
118119
/** @internal */ private _router: UIRouter;
119120
/** @internal */ private _anchorUISref: AnchorUISref;
120121
/** @internal */ private _parent: ParentUIViewInject;
@@ -129,6 +130,7 @@ export class UISref implements OnChanges {
129130
this._parent = parent;
130131

131132
this._statesSub = _router.globals.states$.subscribe(() => this.update());
133+
this._statesSub = _router.globals.params$.subscribe(() => this.update());
132134
}
133135

134136
/** @internal */
@@ -159,6 +161,7 @@ export class UISref implements OnChanges {
159161
ngOnDestroy() {
160162
this._emit = false;
161163
this._statesSub.unsubscribe();
164+
this._paramsSub.unsubscribe();
162165
this.targetState$.unsubscribe();
163166
}
164167

0 commit comments

Comments
 (0)