У нас есть действие Jumpto одного элемента компонента к другому компоненту. В этом случае ChangeDetectorRef[destroyed]
всегда верно, потому что я не могу заставить ChangeDetectorRef.detectChanges()
функцию
home.component
function(){
this.router.navigate(['/dashboardComponent']);
//BehaviorSubject
this.behSubject.subscribe();
}
dashboard.component
ngOninIt(){
//BehaviorSubject
this.behSubject.subscribe(
//function call
this.setValues()
)
}
setValues(){
ChangeDetectorRef[destroyed] // Always true.
}
переносит home.component
уничтоженный экземпляр на dashboard.component
? как это преодолеть?