0

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

halfer
  • 19,824
  • 17
  • 99
  • 186
Ramana Uday
  • 355
  • 2
  • 6
  • 21

0 Answers0