上一页 1 ··· 363 364 365 366 367 368 369 370 371 ··· 491 下一页
摘要: To create a component dynamicly. 1. Add a container with ref: 2. View this container as ViewContainerRef. 3. We need ComponentFactoryResolver: 4. We w 阅读全文
posted @ 2017-02-24 04:11 Zhentiw 阅读(712) 评论(0) 推荐(0)
摘要: ElementRef: ElementRef is a way to access native html element, notice that it only works for Broswer. Render: Render helps to take care of different p 阅读全文
posted @ 2017-02-24 03:40 Zhentiw 阅读(382) 评论(0) 推荐(0)
摘要: Something important to consider when coding a web application is managing the user's focus. For keyboard and screen reader users, we must ensure their 阅读全文
posted @ 2017-02-23 19:50 Zhentiw 阅读(191) 评论(0) 推荐(0)
摘要: TypeScript tries to infer as much about your code as it can. But sometimes there really is not enough context for it to infer reliably. If it tried to 阅读全文
posted @ 2017-02-23 04:20 Zhentiw 阅读(281) 评论(0) 推荐(0)
摘要: We can use 'displayName' on component to change its component tag in dev tool: In dev tool: 阅读全文
posted @ 2017-02-23 04:10 Zhentiw 阅读(518) 评论(0) 推荐(0)
摘要: Root Smart component can be overloaded, divide 'smart' component wisely & using Provider. Problem: Something the root component can be overloaded, mea 阅读全文
posted @ 2017-02-22 20:12 Zhentiw 阅读(355) 评论(0) 推荐(0)
摘要: You can make any element keyboard interactive with the HTML tabindex attribute. But you might need a little extra JavaScript and ARIA to support keybo 阅读全文
posted @ 2017-02-21 01:29 Zhentiw 阅读(199) 评论(0) 推荐(0)
摘要: 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 阅读(387) 评论(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 阅读(1566) 评论(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 阅读(661) 评论(0) 推荐(0)
上一页 1 ··· 363 364 365 366 367 368 369 370 371 ··· 491 下一页