angular2 - gpawade/gpawade.github.io GitHub Wiki
Angular uses semantic versioning http://semver.org/
$ npm install -g @angular/cli
$ ng new my-app
$ ng serve --open
//One-way from data source to view target
Syntax :
{{expression}}
[target]="expression"
bind-target="expression"
{{name}}
<img src="{{imageurl}}">
//One-way from view target to data source
Syntax :
(target)="statement"
on-target="statement"
//TwoWay Data Bind
Syntax -
[(target)]="expression"
bindon-target="expression"
<input [(ngModel)]="name">
{{ 1 + 2}}
{{ getValue() }}
<div [ngClass] = "{special : isSpecial}"></div>
<div [class.special]="isSpecial"> </div>
<button [style.color]="isSpecial ? 'red' : 'green'">
<img [src]="heroImageUrl">
<hero-detail [hero]="currentHero"></hero-detail>
<div [ngClass]="{special: isSpecial}"></div>
<button (click)="onSubmit($event)">Click Me</button>
<button on-click="onSubmit()">Click Me</button>
<input [value]="currentHero.name"
(input)="currentHero.name=$event.target.value" >
<li *ngFor="let itm of items">
</li>
<div *ngIf="isDisplay">
</div>