You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May I ask if you have a non singleton service (for the sake of injection into a component for reusability) that contains:
@UntilDestroy() @Injectable()
ResultSet {
private _loadingSubject = new BehaviorSubject(false);
public isLoading$ = this._loadingSubject().asObservable()
// others
data: []
}
@component()
export class mycomponent implement onDestroy {
result = inject(ResultSet)
// loading data and nourishes result
}
and html of the component that contains result?.isLoading$ | async (PIPE)
do I need to still call untildestroyed using pipe in behaviourSubject as there is a subject and an observable.
It may be a silly question and I am assuming not but just to double check.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
May I ask if you have a non singleton service (for the sake of injection into a component for reusability) that contains:
@UntilDestroy()
@Injectable()
ResultSet {
private _loadingSubject = new BehaviorSubject(false);
public isLoading$ = this._loadingSubject().asObservable()
// others
data: []
}
@component()
export class mycomponent implement onDestroy {
result = inject(ResultSet)
// loading data and nourishes result
}
and html of the component that contains result?.isLoading$ | async (PIPE)
do I need to still call untildestroyed using pipe in behaviourSubject as there is a subject and an observable.
It may be a silly question and I am assuming not but just to double check.
Thanks
Shahi
Beta Was this translation helpful? Give feedback.
All reactions