bustle / ember-mobiledoc-dom-renderer

Render mobiledoc documents in an ember app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Card payload destroyed after render.

3h15 opened this issue · comments

Hi!

Controller:
cardNames: ['demo-card'],
doc: {
"version":"0.2.0",
"sections":[[],[[10,"demo-card",{"text":"test"}]]]
},

Template:
{{render-mobiledoc mobiledoc=doc cardNames=cardNames}}

demo-card template:
{{data.text}}

With the code above, the demo-card is rendered but empty. If I log the payload with {{log data.text}}, it is first logged once with the payload content, then another time as undefined. Obviously the payload is being passed then destroyed, but I couldn't find why.

Am I missing something?

Turns out I was missing something...
payload is passed to payload attribute. NOT data as it is in ember-mobiledoc-editor.