It looks like they have activated usage thisin the template with Angular 2 RC5. I tried this with help Angular 2 Beta, Angular 2 Finaland Angular 4, and it works in the last two.
Here are some live examples ( thisnot added by default, do it like this in the template)
Plunker Angular 2 Beta < -
Angular 2 Final < -
Angular 4 < -
Angular , Component Class. , , this , , 2.x 4.x , .
@Component({
selector: 'my-app',
template: `<div>{{name}}</div>
<div>{{this.name}}</div> `
})
export class MyApp {
name: string = '';
constructor(){
this.name = 'Mr_Perfect';
// ^ required
}
get(name: string)
{
return this.name;
// ^ required
}
}