JSON tree component



I am trying to use: https://github.com/grafana/grafana/blob/master/public/app/core/components/jsontree/jsontree.ts in a panel plugin. This registers a directive jsonTree, so I am expecting that the following in my HTML template should work:

<json-tree object="ctrl.myPropertiesThatHoldsAnObject"></json-tree>

However, it produces no DOM node or output and I am not sure how to troubleshoot further. I am able to include other components such as <code-editor> without issues. Does anyone have an example on how to use the JSON tree component?



I managed to have it show up by changing replaceAll from https://github.com/grafana/grafana/blob/master/public/app/core/components/jsontree/jsontree.ts#L19 into replaceWith. Not quite sure what the issue is and why it seems to be broken in the grafana repo directly :-/