One way data binding in Angular2

Replace this code with app.component

 
//app.component.ts
import { Component } from '@angular/core';
@Component({
  selector: 'my-app',
  template: '<h1>{{heading}}</h1>'
})
export class AppComponent {
	public heading = "This is Angular 2 heading"
 }

Leave a Reply

Your email address will not be published. Required fields are marked *