ng2: error: object unsubscribed #3046

christopherthielen opened this Issue Sep 27, 2016 · 1 comment


None yet

1 participant

christopherthielen commented Sep 27, 2016 edited

UISrefActive seems to throw this exception sometimes.
Probably need to clean up an observable subscription somewhere.

It seems to be happening when the uiSrefActive is enclosing multiple uiSref, and thoseuiSref` are added/removed (e.g., *ngIf)

jhipster/generator-jhipster#4220 (comment)

@christopherthielen christopherthielen added this to the 1.0.0-final milestone Sep 27, 2016
@christopherthielen christopherthielen referenced this issue in jhipster/generator-jhipster Sep 27, 2016

Use hybrid adapter ui-router-ng1-to-ng2 #4220


Plunker Reproduction:

Uncheck "People" to make the "People" uiSref disappear, then click the "About" tab

@deepu105 deepu105 referenced this issue in jhipster/generator-jhipster Oct 2, 2016

Ng2 services #4244

@christopherthielen christopherthielen added a commit that closed this issue Oct 2, 2016
@christopherthielen christopherthielen fix(ng2.uiSrefActive): Allow ng-if on nested uiSrefs
When a `uiSrefActive` wraps multiple `uiSref` directives: when some uiSref were removed from the dom (via `*ngIf`), the observables weren't resetting properly.  This change uses a BehaviorSubject to monitor the initial uiSref[] and any changes to the list.

 Closes #3046
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment