随笔分类 -  Angular

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 23 下一页
摘要:For example we have a component: For TodoAppComponent, we make 'TodoList' as 'viewProviders'. And inside TodoAppComponent, we have TodoInputComponent 阅读全文
posted @ 2017-02-20 00:19 Zhentiw 阅读(661) 评论(0) 推荐(0)
摘要:Content is what is passed as children. View is the template of the current component. The view is initialized before the content and ngAfterViewInit() 阅读全文
posted @ 2017-02-19 23:40 Zhentiw 阅读(2330) 评论(0) 推荐(0)
摘要:*The children element which are located inside of its template of a component are called *view children *. On the other hand, **elements which are use 阅读全文
posted @ 2017-02-19 23:31 Zhentiw 阅读(710) 评论(0) 推荐(0)
摘要:We have looked at @ContentChild in article(http://www.cnblogs.com/Answer1215/p/6414657.html). Now let's how to query multi children by using @ContentC 阅读全文
posted @ 2017-02-19 01:34 Zhentiw 阅读(1210) 评论(0) 推荐(0)
摘要:@ContentChild normally works with ngAfterContentInit lifecycle. @ContentChild is used for looking into child component's props. For example, we a app 阅读全文
posted @ 2017-02-19 01:12 Zhentiw 阅读(1274) 评论(0) 推荐(0)
摘要:For example there is tow form compoennts on the page, and what we want to do is reusing the form component. Make to tow form behave differently, we ca 阅读全文
posted @ 2017-02-19 00:48 Zhentiw 阅读(410) 评论(0) 推荐(0)
摘要:The default core theme comes preinstalled and ready to go with every new project. Learn how to use some of the many helpful utility classes that are p 阅读全文
posted @ 2017-02-13 00:36 Zhentiw 阅读(219) 评论(0) 推荐(0)
摘要:Install: Create: Run: List all emulators: Run a different emulator: Livesync: Run with emulator: If you omit device 'ios', it will run both Android an 阅读全文
posted @ 2017-02-12 20:33 Zhentiw 阅读(283) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2017-02-06 00:02 Zhentiw 阅读(134) 评论(0) 推荐(0)
摘要:From: To: So we create a index.ts file inside 'store' folder: 阅读全文
posted @ 2017-02-05 23:57 Zhentiw 阅读(196) 评论(0) 推荐(0)
摘要:To understand how change detection can help us improve the proference, we need to understand when it works first. There are some rules which can be ap 阅读全文
posted @ 2017-01-31 01:16 Zhentiw 阅读(1387) 评论(0) 推荐(0)
摘要:Let's say the message list can Input (messages) from parent component, and what we want to do is when there are new message, we will scroll message li 阅读全文
posted @ 2017-01-26 18:28 Zhentiw 阅读(256) 评论(0) 推荐(0)
摘要:For the first Effect, will trigger another action: Second effect: will trigger another action: 阅读全文
posted @ 2017-01-26 15:21 Zhentiw 阅读(338) 评论(0) 推荐(0)
摘要:See the current implementaion of code, we have a smart component, and inside the smart component we are using both 'serivce' and 'store'. In the large 阅读全文
posted @ 2017-01-25 03:15 Zhentiw 阅读(1011) 评论(0) 推荐(0)
摘要:When using Radio button for Tamplate driven form, we want to change to the value change and preform some action. 阅读全文
posted @ 2017-01-20 18:13 Zhentiw 阅读(6771) 评论(0) 推荐(0)
摘要:import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/catch'; import 'rxjs/add/observable/throw'; updatePassenger(passenger: Passenger): Observabl... 阅读全文
posted @ 2017-01-19 15:07 Zhentiw 阅读(680) 评论(0) 推荐(0)
摘要:What could be the issue, for example we have two list: Parent component: Child component: They both display list of "passengers". What will happens th 阅读全文
posted @ 2017-01-18 20:17 Zhentiw 阅读(584) 评论(0) 推荐(0)
摘要:The structure directive is just a sugar syntax of <template>. Such as: Equal to: 阅读全文
posted @ 2017-01-17 16:55 Zhentiw 阅读(121) 评论(0) 推荐(0)
摘要:You need to define a <template> to be able to use it elsewhere in your app as a TemplateRef. You can store these TemplateRefs in a Service and then ac 阅读全文
posted @ 2017-01-16 21:48 Zhentiw 阅读(314) 评论(0) 推荐(0)
摘要:Just like passing in an array to *ngFor, you can pass in any value into your structural directive so that it can render templates based on those value 阅读全文
posted @ 2017-01-16 19:44 Zhentiw 阅读(216) 评论(0) 推荐(0)

上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 23 下一页