Skip to content

Instantly share code, notes, and snippets.

@baio
Created March 30, 2017 14:33
Show Gist options
  • Save baio/7f974bab7abc6db1fb5b7c80e6776c43 to your computer and use it in GitHub Desktop.
Save baio/7f974bab7abc6db1fb5b7c80e6776c43 to your computer and use it in GitHub Desktop.
flow example
showElectivesBlockItem$ = this.actions$.let(s =>
Flow.ofActions(s, A.isShowTechAction)
.filter(R.propEq("type", "electives-block"))
.switchMap(this.academicTerm.loadElementCourses)
.mapOk(items => ({ items }))
.flatMap(SA.modal(AcademicTermListItemUOTsComponent))
.do((x: {id: string}) => SA.navigate(["/", "courses", "my", x.id ]))
.mapTo(<any>data.CANCEL_RESULT_ACTION)
.toRx()
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment