【发布时间】:2021-11-06 05:25:21
【问题描述】:
我有这行代码
ngOnInit(): void {
this._store.select(AuthSelectors.isLoggedIn).pipe(
takeUntil(this.destroySubject$),
tap((isLoggedIn) => {
if (isLoggedIn) {
this._store.select(selectCourseToBeEnrolled)
.pipe(filter(value => !!value), first())
.subscribe(course => this._store.dispatch(enrollWhatToLearnCourse({
id: course.id,
title: course.title,
enroll: false
}))
);
}
}),
tap(() => this._store.dispatch(loadOneCourse({}))) //here
).subscribe();
}
现在我在哪里评论我需要通过道具传递当前课程的 ID。有什么想法我该怎么做?
【问题讨论】: