raptorjs-legacy / raptorjs

Source code for the RaptorJS Toolkit
Other
94 stars 12 forks source link

Raptor Templates: Allow an input object for a tag/renderer to be passed in as an attribute instead of using multiple attributes #19

Open patrick-steele-idem opened 11 years ago

patrick-steele-idem commented 11 years ago

The following two code blocks should result in equivalent output:

<ui:button c:input="{label: 'Hello World', color: 'Blue'}"/>
<ui:button label="Hello World" color="Blue"/>

If attributes and a c:input attribute are provided then the attributes should take precedence. That is, the following code should be generated to pass in the input model to the tag handler: extend(myInputData, {label: "Hello World", color: "Blue"})