Closed bastiankemmer closed 8 years ago
I've got this Template:
{{#ScreenProperties}} { "controllerName":"{{&AppName}}.controller.{{&name}}", "height": "100%", "width" : "100%", "content": [{ "title":"{{&name}}", "showHeader" : {{&showHeader}}, "content":[ {{& ScreenContent}} ] }] } {{/ScreenProperties}}
and this is my JSON:
{ "AppName": "Demo1", "ScreenContent": "Hello World", "ScreenProperties": { "name": "Screen1", "showHeader": true } }
When I try to fill my Template, this is the result:
{ "controllerName": ".controller.Screen1", "height": "100%", "width": "100%", "content": [ { "title": "Screen1", "showHeader": true, "content": [] } ] }
But when I try to fill it via Try Mustache, it will give me the right Result. Why does the behavior differ in this context?
PS: I know when my Template would look like that:
{ "controllerName":"{{&AppName}}.controller.{{#ScreenProperties}}{{&name}}", "height": "100%", "width" : "100%", "content": [{ "title":"{{&name}}", "showHeader" : {{&showHeader}}, {{/ScreenProperties}} "content":[ {{& ScreenContent}} ] }] }
it would work.
PS²: Well, I got the reason, this post can be closed.
Which binding strategy were you using?
Glad you got it figured out.
I've got this Template:
and this is my JSON:
When I try to fill my Template, this is the result:
But when I try to fill it via Try Mustache, it will give me the right Result. Why does the behavior differ in this context?
PS: I know when my Template would look like that:
it would work.
PS²: Well, I got the reason, this post can be closed.