摘要:
You can use Select and Option elements in combination with ng-for and ng-model to create mini-forms that change your data as you make a selection./** ... 阅读全文
摘要:
Pipes allow you to change data inside of templates without having to worry about changing it in the Controller. Creating a custom Pipe is as simple as... 阅读全文
摘要:
Style and View Encapsulation is best understood by seeing how each option (Emulated, Native, and None) compare to each other. Angular 2 QuickStart ... 阅读全文
摘要:
import {Input, Component, View, NgClass} from "angular2/angular2";@Component({ selector: 'todo-item-render'})@View({ directives: [NgClass], s... 阅读全文
摘要:
@Input allows you to pass data into your controller and templates through html and defining custom properties. This allows you to easily reuse compone... 阅读全文
摘要:
This lesson covers using the [input] syntax to change an element property such as “hidden” or “content-editable”. Using properties eliminates the need... 阅读全文
摘要:
Instead of add todo as a string, we create a data model:export class TodoModel{ constructor( public title: string = "" ){}}export class T... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
TypeScript is used heavily as we build up our application, but TypeScript isn’t required. If you want to Inject a Service without using TypeScript, yo... 阅读全文