Property data binding with Angular2

Replace this code with app.component

 
//app.component.ts
import { Component } from '@angular/core';
@Component({
  selector: 'my-app',
  template: '<img [src]="sourceProperty">',
})
export class AppComponent {
	public sourceProperty = "http://lorempixel.com/400/400"

 }

Leave a Reply

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