MathJax binding in Angular.jsMay 20th, 2014 in Technical
Step 1 : Include the MathJax source script[code]<script src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>[/code]
Step 2 : Create the Directive[iframe width="100%" height="300" src="http://jsfiddle.net/ddmkr/CBMLx/embedded/html,js" allowfullscreen="allowfullscreen" frameborder="0"]This code will create a mathjax directive that watches for any change on the ng-model attribute. This means that if a controller changes the
$scope.mjxproperty, MathJax will automatically rerender the changed element. In other words, we've done MathJax binding in Angular.jsIf you have any questions or suggestions, feel free to let me know at firstname.lastname@example.org
No comments yet. Be the first to respond!