[ALOY-599] Support data binding for text nodes and multiple fields
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-04-05T11:48:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | alloy, data-binding, model, views |
Reporter | Pedro Enrique |
Assignee | Tony Lukasavage |
Created | 2013-04-04T07:29:36.000+0000 |
Updated | 2014-07-07T20:48:34.000+0000 |
Description
Currently I can do:
<Label text="{title}" />
But I can not do:
<Label>{title}</Label>
<Label text="My {title}" />
<Label>My {title}</Label>
The first line should be easy to add, since for a label like this, the text node will be mapped to the text
property anyway.
The second and third line will require something to be generated like this, using Underscore's template() method:
var __alloyId2 = _.template("My <%- title %>");
var __alloyId3 = Ti.UI.createLabel({
text: __alloyId3({
title : "undefined" != typeof __alloyId1.__transform["title"] ? __alloyId1.__transform["title"] : __alloyId1.get("image")
});
});
Duplicate of ALOY-443