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
Angular Template Code: A small "home made" redux store for simple/small angular applications.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Angular cheatsheet - How to create Angular nested routes
Nested Routes
The following describes how to create and use nested routes in Angular.
Example:
We have an e-shop with two main areas, the Home area and the Special Offers area.
In special offers page we have two sub-pages: Today's Offers and Last Pieces offers.
Angular tip: RxJS - Launch a series of requests one after the other
Launch a series of requests one after the other
In this example we launch a series of requests from information derived from an array. The requests are launched one after the other. This means a "next" request is launched only when the "previous" has been resolved.
The trick here is done by concatMap operator which does exactly what we want. So we create an Observable based on an array of initial values. Then concatMap will render them into a single stream the way we described above.
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/from';
import { concatMap } from 'rxjs/operators';