open-nomad/ui/app/components/json-viewer.js

12 lines
270 B
JavaScript
Raw Normal View History

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