Reputation: 355
I am trying to apply Google Prettify to my AngularJS code but it is working after the ng-route. I also have added a directive for prettify but still facing the problem:
app.directive('prettyprint', function() {
return {
restrict: 'C',
link: function postLink(scope, element, attrs) {
element.html(prettyPrintOne(replaceText(element.html()),'',true));
}
};
});
Here is the Plunker regarding this:
http://plnkr.co/edit/3400Grdp5HejzKuK1sCq?p=preview
Upvotes: 0
Views: 82