Titanium JIRA Archive
Alloy (ALOY)

[ALOY-599] Support data binding for text nodes and multiple fields

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2013-04-05T11:48:54.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsalloy, data-binding, model, views
ReporterPedro Enrique
AssigneeTony Lukasavage
Created2013-04-04T07:29:36.000+0000
Updated2014-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")
  });
});

Comments

  1. Tony Lukasavage 2013-04-05

    Duplicate of ALOY-443

JSON Source