Skip to content

Commit 4f5c638

Browse files
author
Your Name
committed
NgRx - The Complete Guide
1 parent 29be780 commit 4f5c638

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app/courses/home/home.component.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ export class HomeComponent implements OnInit {
5656
map(courses => courses.filter(course => course.category == 'ADVANCED'))
5757
);
5858

59+
this.promoTotal$ = courses$
60+
.pipe(
61+
map(courses => courses.filter(course => course.promo).length)
62+
);
63+
5964
}
6065

6166
onAddCourse() {

0 commit comments

Comments
 (0)