Ng-prettyjson

Angular directive pretty json display

Welcome

Just 2 samples here.

Small json

Code

<!DOCTYPE html>
<html>
<head>
  ...
  <link href="css/ng-prettyjson.min.css" rel="stylesheet" />
  <script type="javascripts/javascript" src="angular.min.js" />
  <script type="javascripts/javascript" src="ng-prettyjson.min.js" />
</head>
<body>
  ...
  
  <div>
    <pre class='json' json='json' pretty-json />
  </div>
  
  
  <script>
    function ctrl($scope) {
        var obj = {a:1, 'b':'foo', c:[false,null, {d:{e:1.3e5}}]};      
        $scope.json = obj;
    }   
  </script>
      
</body>
</html>

Bigger json