| OLD | NEW |
| (Empty) |
| 1 <head> | |
| 2 <link rel="import" href="observatory_element.html"> | |
| 3 </head> | |
| 4 <polymer-element name="json-view" extends="observatory-element"> | |
| 5 <template> | |
| 6 <template bind if="{{ valueType == 'Primitive' }}"> | |
| 7 <span>{{primitiveString}}</span> | |
| 8 </template> | |
| 9 <template bind if="{{ valueType == 'List' }}"> | |
| 10 <table class="table table-condensed table-bordered"> | |
| 11 <caption class="text-left">List, {{list.length}}</caption> | |
| 12 <tbody> | |
| 13 <tr template repeat="{{item in list)}}"> | |
| 14 <th>{{counter}}</th> | |
| 15 <td><json-view json="{{item}}"></json-view></td> | |
| 16 </tr> | |
| 17 </tbody> | |
| 18 </table> | |
| 19 </template> | |
| 20 <template if="{{ valueType == 'Map' }}"> | |
| 21 <table class="table table-condensed table-bordered"> | |
| 22 <caption class="text-left">Map, {{keys.length}}</caption> | |
| 23 <tbody> | |
| 24 <tr template repeat="{{key in keys}}"> | |
| 25 <th>{{key}}</th> | |
| 26 <td><json-view json="{{value(key)}}"></json-view></td> | |
| 27 </tr> | |
| 28 </tbody> | |
| 29 </table> | |
| 30 </template> | |
| 31 </template> | |
| 32 <script type="application/dart" src="json_view.dart"></script> | |
| 33 </polymer-element> | |
| OLD | NEW |