title: Getting MathJax to update after changes to AngularJS model
body: <p>I am trying to use AngularJS two-way binding text which includes Latex style equations.  I would like to call MathJax to format the equations, but I'm not sure of the best way to ensure that MathJax is called after AngularJS finishes changing the model.  I think I need a callback.  Here is my JavaScript:</p>
  
  <pre><code>var myApp = angular.module('myApp',[]);
  function MyCtrl($scope) {
     $scope.Update = function() {
         $scope.Expression = 'Evaluate: \\( \\frac{9}{4} \\div \\frac{1}{6} \\)';
         MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
     }
     $scope.Expression = 'Evaluate: \\( \\frac{5}{4} \\div \\frac{1}{6} \\)';
  </code></pre>
  
  <p>}</p>
  
  <p>And here is my HTML:</p>
  
  <pre><code>&lt;div ng-controller="MyCtrl"&gt;
      &lt;button ng-click="Update()"&gt;Update&lt;/button&gt;
    {{Expression}}
  &lt;/div&gt;
  </code></pre>
  
  <p>Fiddle is here: <a href="http://jsfiddle.net/LukasHalim/UVjTD/1/" rel="noreferrer">http://jsfiddle.net/LukasHalim/UVjTD/1/</a>.  You'll notice that on the fiddle the original expression isn't removed even after you click the update button twice - seems like a bug or conflict.</p>