open-nomad/ui/app/components/json-viewer.js
2018-08-13 17:04:14 -07:00

12 lines
270 B
JavaScript

import Component from '@ember/component';
import { computed } from '@ember/object';
export default Component.extend({
classNames: ['json-viewer'],
json: null,
jsonStr: computed('json', function() {
return JSON.stringify(this.get('json'), null, 2);
}),
});