Does anyone have experience using the angular-bootstrap-prettify.js prettyprint directive? I am having problems geting this to work. Here is my Example: http://jsfiddle.net/mjxNV/
<div ng-app>
<div ng-controller="Ctrl1">
<pre class="prettyprint linenums">
<code class="lang-html">
<div class="container">
<div class="left_column">
<span>Small Text</span>
</div>
<div class="r_ightcolumn2">
<span>Small Text</span>
</div>
</div>
</code>
</pre>
</div>
</div>
My code is displayed but it never goes through the prettyprint tokenization. What am I doing wrong?
I found a sample and modify as your sample:
angular.module('app', [])
.controller('ctrl', function($scope) { });
ap.directive('prettyprint', function() {
return {
restrict: 'C',
link: function postLink(scope, element, attrs) {
element.html(prettyPrintOne(element.html(),'',true));
}
};
});