title: What is the best practice for opening a jquery dialog from angular?
body: <p>Heres the html:</p>
  
  <pre><code>&lt;div ng-controller="MyCtrl"&gt;
      &lt;a ng-click="open()"&gt;Open Dialog&lt;/a&gt;
      &lt;div id="modal-to-open" title="My Title" ui-jq="dialog" ui-options="{width: 350, autoOpen: false, modal: true}"&gt;
          Dialog Text
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here's the js:</p>
  
  <pre><code>function MyCtrl($scope) 
  {
      $scope.open = function () {
          $('#modal-to-open').dialog('open');
      }
  }
  </code></pre>
  
  <p>Is this the best way to go about doing this? It seems like there could be a better way of opening it without accessing the DOM but I am not sure how I would go about that. The above code works, I am just wondering if this is the way I should go about doing this. Any input is welcome.</p>