case 'CHOOSE': {
return Object.assign(state, { choosed: action.choosed }
});
}
case 'CHOOSE': {
return state = {...state, choosed: action.choosed }
}
Observable.interval(3000)
.do(value => console.log('attempt #', value))
.switchMap(() => Observable.defer(() => this.http.get(url))
.map(data => data)
.catch(err => console.log(err))
)
.catch (err => Observable.empty())
.subscribe(data => console.log(data));