04 2016 档案

摘要:If Typescript is the first language in which you've encountered generics, the concept can be quite difficult to understand. We skip the lecture in thi 阅读全文
posted @ 2016-04-29 03:47 Zhentiw 阅读(183) 评论(0) 推荐(0) 编辑
摘要:Download from npm: https://www.npmjs.com/package/angular-md-table +: Responsive: Has both Mobile view and Desktop view i18n: works well with angular-t 阅读全文
posted @ 2016-04-28 20:01 Zhentiw 阅读(435) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-04-28 04:10 Zhentiw 阅读(203) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-04-28 03:53 Zhentiw 阅读(256) 评论(0) 推荐(0) 编辑
摘要:Add another reducer: Added a 'people' reducer, defined a 'defaultPeople' as default state. In bootstrap, add people reducer to the provideStore(). The 阅读全文
posted @ 2016-04-27 21:06 Zhentiw 阅读(207) 评论(0) 推荐(0) 编辑
摘要:The components inside of your container components can easily accept Observables. You simply define your custom @Input then use the Async pipe when yo 阅读全文
posted @ 2016-04-27 02:31 Zhentiw 阅读(570) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-04-27 02:00 Zhentiw 阅读(199) 评论(0) 推荐(0) 编辑
摘要: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. 阅读全文
posted @ 2016-04-27 01:52 Zhentiw 阅读(300) 评论(0) 推荐(0) 编辑
摘要: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. 阅读全文
posted @ 2016-04-26 19:02 Zhentiw 阅读(293) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-04-26 18:14 Zhentiw 阅读(196) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-04-26 03:48 Zhentiw 阅读(239) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-04-26 03:32 Zhentiw 阅读(168) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-04-26 03:26 Zhentiw 阅读(228) 评论(0) 推荐(0) 编辑
摘要:Instead of simply pushing numbers on a timer into the template, now we'll move on to pushing actual Dates. We'll still use the Async pipe, but we'll a 阅读全文
posted @ 2016-04-26 03:17 Zhentiw 阅读(244) 评论(0) 推荐(0) 编辑
摘要:Angular 2 templates use a special Async pipe to be able to render out Observables. This lesson covers the syntax used to create an Observable in Angul 阅读全文
posted @ 2016-04-26 03:12 Zhentiw 阅读(750) 评论(0) 推荐(0) 编辑
摘要:Something like 'for' or 'while', 'if', they don't create a new scope: Everyting written in for loop can be accessed outside the for loop. So, the prob 阅读全文
posted @ 2016-04-25 16:23 Zhentiw 阅读(161) 评论(0) 推荐(0) 编辑
摘要:Create a Firebase Servcie: Display the list: 阅读全文
posted @ 2016-04-25 04:59 Zhentiw 阅读(229) 评论(0) 推荐(0) 编辑
摘要:Pull the docker image: Show all the images: Remove the image: Run the image: Once run the images, you can see the webpage the your docker site url. Li 阅读全文
posted @ 2016-04-25 03:28 Zhentiw 阅读(188) 评论(0) 推荐(0) 编辑
摘要:if-statements can add serious complexity and beg for refactoring. You can use polymorphic functions to simplify your ifs and dynamically call the appr 阅读全文
posted @ 2016-04-24 00:47 Zhentiw 阅读(173) 评论(0) 推荐(0) 编辑
摘要:Using CSS media queries allows you to design responsive layout in your web apps and website. We will go over the media query basics in this lesson. 阅读全文
posted @ 2016-04-22 18:53 Zhentiw 阅读(155) 评论(0) 推荐(0) 编辑
摘要:Source: Link We will looking some opreators for combining stream in RxJS: merge combineLatest withLatestFrom concat forkJoin flatMap / switchMap Merge 阅读全文
posted @ 2016-04-20 00:14 Zhentiw 阅读(442) 评论(0) 推荐(0) 编辑
摘要:$parse is useful when you want to parse an expression and the context is not defined yet. For example, I have a table component which allows user to p 阅读全文
posted @ 2016-04-19 16:14 Zhentiw 阅读(192) 评论(0) 推荐(0) 编辑
摘要:Benefit to use child router is Angualr 2 then can lazy load the component on demand. Define a child router by adding three dots `/characters/...`: So 阅读全文
posted @ 2016-04-19 03:38 Zhentiw 阅读(493) 评论(0) 推荐(0) 编辑
摘要:When we define router in Angualr 2, we use @RouteConcfig() When we want to display component, we use <router-outlet> When we want to navigate to compo 阅读全文
posted @ 2016-04-18 02:40 Zhentiw 阅读(431) 评论(0) 推荐(0) 编辑
摘要:In a CSS library like Bootstrap we can set a button's style to be "primary" or "secondary" by appending classes. For React components we want to be ab 阅读全文
posted @ 2016-04-18 01:25 Zhentiw 阅读(412) 评论(0) 推荐(0) 编辑
摘要:So far, when writing these subscribe functions, we haven't returned anything. It is possible return an unsubscribe function from a subscribe function. 阅读全文
posted @ 2016-04-17 23:36 Zhentiw 阅读(185) 评论(0) 推荐(0) 编辑
摘要:We have been using Observable.create() a lot in previous lessons, so let's take a closer look how does it work. The create function: In deep, create() 阅读全文
posted @ 2016-04-17 16:58 Zhentiw 阅读(184) 评论(0) 推荐(0) 编辑
摘要:It is quite common to need an Observable that ticks periodically, for instance every second or every 100 miliseconds. We will learn about operators in 阅读全文
posted @ 2016-04-17 16:43 Zhentiw 阅读(358) 评论(0) 推荐(0) 编辑
摘要:Child: parent: 阅读全文
posted @ 2016-04-14 17:48 Zhentiw 阅读(261) 评论(0) 推荐(0) 编辑
摘要:This lesson introduces operators empty(), never(), and throw(), which despite being plain and void of functionality, are very useful when combining wi 阅读全文
posted @ 2016-04-14 01:06 Zhentiw 阅读(236) 评论(0) 推荐(0) 编辑
摘要:Besides converting arrays and promises to Observables, we can also convert other structures to Observables. This lesson teaches how we can convert any 阅读全文
posted @ 2016-04-14 00:57 Zhentiw 阅读(489) 评论(0) 推荐(0) 编辑
摘要:The of() operator essentially converted a list of arguments to an Observable. Since arrays are often how we structure list of things in JavaScript, we 阅读全文
posted @ 2016-04-14 00:45 Zhentiw 阅读(622) 评论(0) 推荐(0) 编辑
摘要:List all the docker machine: Can check 'ip' and 'status': List the running container we have: Switch to another docker machine: defualt List all the ' 阅读全文
posted @ 2016-04-13 03:08 Zhentiw 阅读(175) 评论(0) 推荐(0) 编辑
摘要:Array push is used to add elements to the end of an Array. In this lesson we'll see how the push method accepts multiple arguments, can be used to mer 阅读全文
posted @ 2016-04-13 02:50 Zhentiw 阅读(182) 评论(0) 推荐(0) 编辑
摘要:In Angular 1.5, there is no link and compile. So use if you transclude, you cannot access the fifth arguement in link function, which is transcludeFn. 阅读全文
posted @ 2016-04-12 22:38 Zhentiw 阅读(351) 评论(0) 推荐(0) 编辑
摘要:RxJS is a lot about the so-called "operators". We will learn most of the important operators, one by one. In this lesson, we will see our first creati 阅读全文
posted @ 2016-04-11 02:18 Zhentiw 阅读(195) 评论(0) 推荐(0) 编辑
摘要:The Observer object has the functions next() and error(). In this lesson we will see the other (and last) function available on observers, complete(), 阅读全文
posted @ 2016-04-10 23:27 Zhentiw 阅读(342) 评论(0) 推荐(0) 编辑
摘要:Well, on Windows costs a little bit effort to run docker. 1. You need to enable Virtulization: Oh hp Windows machine, you need to Turn off you laptop 阅读全文
posted @ 2016-04-10 23:05 Zhentiw 阅读(254) 评论(0) 推荐(0) 编辑
摘要:Whenever we are writing code, we need to remember that things may go wrong. If an error happens in a function, that error will be thrown. Errors can a 阅读全文
posted @ 2016-04-10 00:30 Zhentiw 阅读(346) 评论(0) 推荐(0) 编辑
摘要:Wouldn't it be nice if everyone ran the tests before committing code? With ghooks, you can automatically add a githook when dependencies are installed 阅读全文
posted @ 2016-04-08 00:54 Zhentiw 阅读(169) 评论(0) 推荐(0) 编辑
摘要:You can also use Promise for http: So for the service, you need to call toPromise() method: Then in your controller, you can get the Promise back: But 阅读全文
posted @ 2016-04-07 01:54 Zhentiw 阅读(288) 评论(0) 推荐(0) 编辑
摘要:Let's see how to track index when we use 'ngFor: <li *ngFor="#hero of heros | async; let i = index"> <hero-item [hero]="hero" (changed)="thisHero = $e 阅读全文
posted @ 2016-04-07 01:14 Zhentiw 阅读(732) 评论(1) 推荐(0) 编辑
摘要:Property Binding is bind property NOT attribute! So 'class' is attribute on DOM, but 'class.active' is an property. 'aria-label' is attribute, so need 阅读全文
posted @ 2016-04-06 03:23 Zhentiw 阅读(314) 评论(0) 推荐(0) 编辑
摘要:In Angular2, sometime we use @Output to pass data to parent component, then parent may pass the data down to another child component. When you want to 阅读全文
posted @ 2016-04-06 01:51 Zhentiw 阅读(177) 评论(0) 推荐(0) 编辑
摘要:When you want to access child component's method, you can use @ViewChild in the parent: Parent Component: Child Component: 阅读全文
posted @ 2016-04-05 01:00 Zhentiw 阅读(440) 评论(0) 推荐(0) 编辑
摘要:Just like create html page, you can create a svg tag by: Inside svg, x,y: control the position of element fill: control the color of element height, w 阅读全文
posted @ 2016-04-04 00:34 Zhentiw 阅读(295) 评论(0) 推荐(0) 编辑
摘要:Async Pipe: The Asynce pipe receive a Promise or Observable as input and subscribes to the input, evetually emitting the value(s) changes arrive. In t 阅读全文
posted @ 2016-04-03 17:52 Zhentiw 阅读(365) 评论(0) 推荐(0) 编辑
摘要:Define a function type and params type: 阅读全文
posted @ 2016-04-01 20:38 Zhentiw 阅读(227) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示