Привязка значения в текстовой области

Я пытаюсь сделать простейшую двустороннюю привязку в Angular2. Я хотел бы поделиться переменной между моим компонентом и его шаблоном.

Мой шаблон:

<textarea [(ngModel)]="currentQuery"></textarea>

И мой компонент:

import { Component } from '@angular/core';
import { ViewChild } from '@angular/core';
import { OnInit } from '@angular/core';

@Component({
  moduleId: module.id,
  selector: 'vs-home',
  templateUrl: 'home.component.html'
})

export class HomeComponent {
    private currentQuery: string = '';
}

Согласно документации это должно работать, но я получаю:

Error: Uncaught (in promise): Error: Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'textarea'. ("
    <div class="query-bar-container">
        <textarea [ERROR ->][(ngModel)]="currentQuery"></textarea>
        <!-- <button type="button" class="btn btn-default" (click"): HomeComponent@2:15

Ответы на вопрос(1)

Ваш ответ на вопрос