title: Binding Textarea in Angular 2
body: <p>I have an assignment on how to use tinymce. I followed the basic tutorial on the documentation but i dont know if ngModel wouldn't work on textarea. In my code,  the <code>htmlBody</code> in my onMessage function is to submit the content of my textearea. Is there a reason why the content of the htmlBody would not be submitted? When i trigger the function onMessage(), the content of the htmlBody is not submitted. That is my issue</p>
  
  <p>
         </p>
  
  <pre><code>    &lt;div class="tiny"&gt;
  
  
       &lt;div id="tinyFormGroup" class="form-group"&gt;
          &lt;div  class="hidden"&gt;
              &lt;textarea  [(ngModel)]="htmlBody" id="baseTextArea" name="body" &gt;{{htmlBody}}&lt;/textarea&gt;
          &lt;/div&gt;
          &lt;/div&gt;
  
  
      &lt;/div&gt;
      &lt;div class="form-group"&gt;
                    &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
  
  
                  &lt;/form&gt;
  
      inputs: ['mceContent'],
          outputs: ['contentChanged'],
          providers:[HttpService]
  
  export class EmailComponent {
  
      private elementRef: ElementRef;
      private elementID: string;
      private htmlBody = "Write Your Message Here";
      private title;
  
  
  
  
      public contentChanged: EventEmitter&lt;any&gt;;
  
  
      constructor(@Inject(ElementRef) elementRef: ElementRef, private httpService:HttpService)
      {
          this.elementRef = elementRef;
  
          var randLetter = String.fromCharCode(65 + Math.floor(Math.random() * 26));
          var uniqid = randLetter + Date.now();
  
          this.elementID = 'tinymce' + uniqid;
          this.contentChanged = new EventEmitter();
  
  
      }
  
  
  
  
  
      ngAfterViewInit()
      {
          //Clone base textarea
          var baseTextArea = this.elementRef.nativeElement.querySelector("#baseTextArea");
          var clonedTextArea = baseTextArea.cloneNode(true);
          clonedTextArea.id = this.elementID;
  
          var formGroup = this.elementRef.nativeElement.querySelector("#tinyFormGroup");
          formGroup.appendChild(clonedTextArea);
  
  
  
  
  
  
          tinymce.init(
              {
  
  
                  mode: 'exact',
                  height: 300,
  
                  theme: 'modern',
  
                  ],
  
                  elements: this.elementID,
                  setup: this.tinyMCESetup.bind(this)
              }
          );
      }
  
      tinyMCESetup(ed) {
          ed.on('keyup', this.tinyMCEOnKeyup.bind(this));
      }
  
      tinyMCEOnKeyup(e) {
          this.contentChanged.emit(tinymce.get(this.elementID).getContent());
      }
  
      set mceContent(content) {
        this.htmlBody = content;
      }
  
      onMessage(){
  
  
          this.httpService.addDraft(this.htmlBody)
          .subscribe(data =&gt; {
  
  
          })
  
  
      }
  }
  </code></pre>