Templates
<span>{{interpolatedValue + getValue() + 4}}</span>
Ne jamais utiliser les [] si :
<img [src]="logo.jpg" />
<img [attr.src]="logo.jpg" />
<span [style.color]="componentStyle">Some colored text!</span>
<button (click)="alertTheWorld()">Click me!</button>
<md-input-container>
<label>The awesome input</label>
<input md-input [(ngModel)]="dynamicValue"
placeholder="Watch the text update!" type="text"> </md-input-container>
<br>
<span>{{dynamicValue}}</span>
<div *ngIf=”userIsVisible”>{{user.name}}</div>
<template [ngIf]="userIsVisible">
<div>{{user.name}}</div>
</template>
<img src="logo.jpg" #myImage />
{{myImage.src}}
<md-input-container>
<label>Type to see the value</label> <input md-input type="text" #input />
</md-input-container>
<strong>{{input?.value}}</strong>