angular 双向绑定

<input type="text" [(ngModel)]="name">
{{name}}
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-bind',
  templateUrl: './bind.component.html',
  styleUrls: ['./bind.component.css']
})
export class BindComponent implements OnInit {

  private name;

  constructor() { }

  ngOnInit() {
    this.name = 'cys';
  }


}