摘要: @Input allows you to pass data into your controller and templates through html and defining custom properties. This allows you to easily reuse compone... 阅读全文
posted @ 2015-10-26 04:34 Zhentiw 阅读(601) 评论(0) 推荐(0)
摘要: This lesson covers using the [input] syntax to change an element property such as “hidden” or “content-editable”. Using properties eliminates the need... 阅读全文
posted @ 2015-10-26 04:15 Zhentiw 阅读(260) 评论(0) 推荐(0)
摘要: Instead of add todo as a string, we create a data model:export class TodoModel{ constructor( public title: string = "" ){}}export class T... 阅读全文
posted @ 2015-10-26 04:07 Zhentiw 阅读(261) 评论(0) 推荐(0)
摘要: Two-way binding still exists in Angular 2 and ng-model makes it simple. The syntax is a combination of the [input] and (output) syntax to represent th... 阅读全文
posted @ 2015-10-26 02:38 Zhentiw 阅读(263) 评论(0) 推荐(0)
摘要: It’s conceptually the same as Angular 1’s ng-repeat, but you’ll find the syntax quite different as it aligns with #refs in Angular 2 and JavaScript “f... 阅读全文
posted @ 2015-10-26 02:26 Zhentiw 阅读(389) 评论(0) 推荐(0)