title: angular-wysiwyg form validation
body: <p>I'm trying to use <code>angular-wysiwyg</code> and form validation. Instead of using the standard <code>form.textArea.$dirty</code> I've been updating a flag on the scope:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.onTextChange = function (value) {
    $scope.textContent = value;
    $scope.isContentDirty = true;
    ...
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Then I can use the property on my button:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button ng-diabled="isContentDirty"&gt;&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>But I'd prefer to do something like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;wysiwyg name="myTextArea" ng-model="textContent"&gt;&lt;/wysiwyg&gt;
  
  &lt;button ng-disabled="!form.myTextArea.$dirty&gt;&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How could I make this work?    </p>
  
  <p>Here's an open issue sort of related:<br>
  <a href="https://github.com/TerryMooreII/angular-wysiwyg/issues/43" rel="nofollow">https://github.com/TerryMooreII/angular-wysiwyg/issues/43</a>    </p>
  
  <p>Here are the docs for this directive:    <a href="https://github.com/TerryMooreII/angular-wysiwyg#usage" rel="nofollow">https://github.com/TerryMooreII/angular-wysiwyg#usage</a></p>