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

12 lines
263 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() {
2019-03-26 07:46:44 +00:00
return JSON.stringify(this.json, null, 2);
2017-09-19 14:47:10 +00:00
}),
});