随笔分类 - Angular
摘要:Create a index.html: Index.html works as an App Shell, which render meanful pixel onto the screen. And our module will be rendered when the data bindi
阅读全文
摘要:Let's say we have a list of contacts, click each contact, we can render a new route to get the detail. Define the routers: path: '', --> here empty pa
阅读全文
摘要:Install: Create a project: Run the project: Change the port: Create a component: The component will be created in src/app/contact-list-component. Gene
阅读全文
摘要:This lesson shows you how to build a Toggle Button in Angular 2 from scratch. It covers using transclusion in Angular 2, setting up your own two-way b
阅读全文
摘要:When you use ngrx/store and you want to fire a service request. When it sucessfully return the response, you need to dispatch action to tell the store
阅读全文
摘要:Orgial aritial --> Link The problem with Angular 1 DI: Angular 2 DI: Solve the singletons problem: The service you inject to the parent component can
阅读全文
摘要:Oingial aritial --> Link Take away: When you use `templateUrl` & `styleUrls`, the path are relative to the application root. So if you compoennt is pu
阅读全文
摘要:So How to do lazy loading for router in Angular 2. The nomarl way to write a router in Angular 2: You have SimpleCmp and UserCmp as child components.
阅读全文
摘要:PWA: Add to home screen Angular Universal Server side rendering: for achieving better proference on init loading Angular 2 CLI ng new myapp --mobile s
阅读全文
摘要:Check the Github: https://github.com/ngrx/devtools Example:
阅读全文
摘要:@ngrx/store builds on the concepts made popular by Redux and supercharges it with the backing of RxJS. The result is a tool and philosophy that will t
阅读全文
摘要:RxJS allows you to combine streams in various ways. This lesson shows you how to take a click stream and combine it with a store stream to use a value
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号