1. #1
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    104
    Vote Rating
    0
    jej2003 is on a distinguished road

      0  

    Question Template/JSON object Question

    Template/JSON object Question


    When using a template to render a JSON object to a panel how can I access public properties of the JSON object?

    For instance my JSON object is like:
    {Location:{lattitude:0, longitude:0}} how can I make the template render these? I have tried doing something like

    Code:
    var locationTplMarkup = [
    		'Location: {Location.lattitude}, {Location.longitude}<br/>'
    	];
    to no avail. What is the proper way to reference these properties in the template?

  2. #2
    Sencha Premium Member
    Join Date
    Apr 2009
    Posts
    104
    Vote Rating
    0
    jej2003 is on a distinguished road

      0  

    Default


    Found the solution, Xtemplate and

    Code:
        '<tpl for="Location">',
            '{lattitude}, {longitude}</br>',
        '</tpl>