title: How to bind a $scope variable with text editor in angularjs
body: <p>This is my Editor input tag:</p>
  
  <pre><code>&lt;textarea cols="18" rows="40" class="wysihtml5 wysihtml5-min form-control" ng-model="TemplateDescription"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>When binding my $scope variable with ng-model then it returns <strong>undefined</strong>. and when I bind my $scope variable with ng-bind-html then still the same result. So then I gave an Id to this textarea and accessed the value inside of it by using this statement.</p>
  
  <pre><code>$scope.TemplateDescription = $sce.trustAsHtml($("#templateDescription").val());
  </code></pre>
  
  <p>I get the values as shown in the image below, so how can I get my required html text in my modal so that I can pass this value to save into database. Any kind of help will be appreciated.
  <a href="https://i.stack.imgur.com/B3ruR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/B3ruR.png" alt="enter image description here"></a></p>