摘要:
Reducers are also often used for changing a single property inside of other reducers. This lesson shows how a type can enter the people reducer, but t 阅读全文
摘要:
Add another reducer: Added a 'people' reducer, defined a 'defaultPeople' as default state. In bootstrap, add people reducer to the provideStore(). The 阅读全文
摘要:
The components inside of your container components can easily accept Observables. You simply define your custom @Input then use the Async pipe when yo 阅读全文
摘要:
Angular 2 allows you to pass values from inputs simply by referencing them in the template and passing them into your Subject.next() call. This lesson 阅读全文
摘要:
While action types allow you tell your reducer what action it should take, the payload is the data that your reducer will use to update the state. 阅读全文
摘要:
ngrx/store is a library that simplifies common RxJS patterns for managing state and gives you an easy api to use it within your Angular 2 application. 阅读全文
摘要:
While you have multiple streams flowing into your scan operator, you'll need to map each stream to the specific values you need to update your state t 阅读全文
摘要:
The scan operator in RxJS is the main key to managing values and states in your stream. Scan behaves just as a reduce function would, but scan is able 阅读全文
摘要:
Observable.merge allows you take two different source streams and use either one of them to make changes to the same state of your data. This lesson s 阅读全文
摘要:
While Angular 2 usually uses event handlers to manage events and RxJS typically uses Observable.fromEvent, a good practice when using Angular 2 and Rx 阅读全文