angular property binding

Solutions on MaxInterview for angular property binding by the best coders in the world

showing results for - "angular property binding"
Aine
02 Mar 2017
1    // component.ts
2
3    @Component({
4      templateUrl: 'component.html',
5      selector: 'app-component',
6    })
7    export class Component {
8      name = 'Peter';
9
10      updateName() {
11        this.name = 'John';
12      }
13    }
14
Jake
29 Apr 2017
1
2import { Component } from "@angular/core";
3@Component({
4   selector: 'app-example',
5  template: `
6              <div>
7              <input [value]='myText'></span>       
8              </div>
9              `
10})
11export class AppComponent {
12  myText: string = "Hello World";
13}