File tree
Expand file treeCollapse file tree1 file changed
+28
-1
lines changed Expand file treeCollapse file tree1 file changed
+28
-1
lines changed Original file line number | Diff line number | Diff line change |
---|
|
87 | 87 | }
|
88 | 88 |
|
89 | 89 | </style>
|
| 90 | + |
| 91 | +<script type="text/javascript"> |
| 92 | +if (typeof Object.assign != 'function') { |
| 93 | +Object.assign = function(target, varArgs) { // .length of function is 2 |
| 94 | +'use strict'; |
| 95 | +if (target == null) { // TypeError if undefined or null |
| 96 | +throw new TypeError('Cannot convert undefined or null to object'); |
| 97 | +} |
| 98 | + |
| 99 | +var to = Object(target); |
| 100 | + |
| 101 | +for (var index = 1; index < arguments.length; index++) { |
| 102 | +var nextSource = arguments[index]; |
| 103 | + |
| 104 | +if (nextSource != null) { // Skip over if undefined or null |
| 105 | +for (var nextKey in nextSource) { |
| 106 | +// Avoid bugs when hasOwnProperty is shadowed |
| 107 | +if (Object..hasOwnProperty.call(nextSource, nextKey)) { |
| 108 | +to[nextKey] = nextSource[nextKey]; |
| 109 | +} |
| 110 | +} |
| 111 | +} |
| 112 | +} |
| 113 | +return to; |
| 114 | +}; |
| 115 | +} |
| 116 | +</script> |
90 | 117 | </head>
|
91 | 118 | <body ng-app="test" ng-controller="TestCtrl" ng-cloak>
|
92 | 119 | <nav class="navbar navbar-default">
|
@@ -339,7 +366,7 @@ <h3>Schema</h3>
|
339 | 366 | };
|
340 | 367 |
|
341 | 368 | $scope.pretty = function(){
|
342 |
| -return typeof $scope.modelData === 'string' ? $scope.modelData : JSON.stringify($scope.modelData, undefined, 2); |
| 369 | +return typeof $scope.modelData === 'string' ? $scope.modelData : angular.toJson($scope.modelData); |
343 | 370 | };
|
344 | 371 |
|
345 | 372 | $scope.log = function(msg){
|
|
You can’t perform that action at this time.
0 commit comments