src/ng-prettyjson.js
function highlight(value) {
        var html = ngPrettyJsonFunctions.syntaxHighlight(value) || "";
        html = html
        .replace(/\{/g, "<span class='sep'>{</span>")
        .replace(/\}/g, "<span class='sep'>}</span>")
        .replace(/\[/g, "<span class='sep'>[</span>")
        .replace(/\]/g, "<span class='sep'>]</span>")
        .replace(/\,/g, "<span class='sep'>,</span>");                        
        return isDefined(value) ? scope.tmplElt.find('pre').html(html) : scope.tmplElt.find('pre').empty();
      }
function highlight(value) {
        var html = ngPrettyJsonFunctions.syntaxHighlight(value) || "";
        html = html
        .replace(/\{/g, "<span class='sep'>{</span>")
        .replace(/\}/g, "<span class='sep'>}</span>")
        .replace(/\[/g, "<span class='sep'>[</span>")
        .replace(/\]/g, "<span class='sep'>]</span>")
        .replace(/\,/g, "<span class='sep'>,</span>");                        
        return isDefined(value) ? scope.tmplElt.find('pre').html(html) : scope.tmplElt.find('pre').empty();
      }
function highlight ( value ) { var html = ngPrettyJsonFunctions . syntaxHighlight ( value ) || "" ; html = html . replace ( / \{ / g , "<span class='sep'>{</span>" ) . replace ( / \} / g , "<span class='sep'>}</span>" ) . replace ( / \[ / g , "<span class='sep'>[</span>" ) . replace ( / \] / g , "<span class='sep'>]</span>" ) . replace ( / \, / g , "<span class='sep'>,</span>" ) ; return isDefined ( value ) ? scope . tmplElt . find ( 'pre' ) . html ( html ) : scope . tmplElt . find ( 'pre' ) . empty ( ) ; }
prefer the "json" attribute over the "prettyJson" one. the value on the scope might not be defined yet, so look at the markup.
prefer the json attribute over the prettyJson one . the value on the scope might not be defined yet so look at the markup .