上一页 1 ··· 366 367 368 369 370 371 372 373 374 ··· 494 下一页
摘要: We can use @ViewChild with component: By doing this, we actually can access component's prop and events. If we want to get component DOM node, what we 阅读全文
posted @ 2017-02-20 00:40 Zhentiw 阅读(390) 评论(0) 推荐(0)
摘要: When you use @ViewChildren, the value can only be accessable inside ngAfterViewInit lifecycle. This is somehow different from @ViewChild, which value 阅读全文
posted @ 2017-02-20 00:31 Zhentiw 阅读(1569) 评论(0) 推荐(0)
摘要: 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 阅读(664) 评论(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 阅读(2332) 评论(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 阅读(1212) 评论(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 阅读(1276) 评论(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 阅读(411) 评论(0) 推荐(0)
摘要: We often want to check if an array includes a specific item. It's been common to do this with the Array.prototype.indexOf method, but now we have a si 阅读全文
posted @ 2017-02-17 18:58 Zhentiw 阅读(225) 评论(0) 推荐(0)
摘要: Handling your logic with composable functions makes your code declarative, leading to code that's easy to read and easy to test. Breaking that up to w 阅读全文
posted @ 2017-02-17 18:50 Zhentiw 阅读(438) 评论(0) 推荐(0)
上一页 1 ··· 366 367 368 369 370 371 372 373 374 ··· 494 下一页