mercredi 20 juin 2018

How to dynamically form a Table column based on JSON Values in Ember 1.10

I am using Ember 1.10 version

[{
        "name": "John",
        "city": "New York",
        "status": false
    },
    {
        "name": "SAAA",
        "city": "California",
        "status": true
    },
    {
        "name": "Vignesh",
        "city": "India",
        "status": false
    }
]

Based on the above JSON i am forming a table . Incase the status is false , i need to show a different column and vice versa

But irrespective of status , its displaying a same Value .

<script type="text/x-handlebars">
   
</script>
<script type="text/x-handlebars" data-template-name="index">
   <table class="table table-striped table-condensed">
    <thead>
        <tr>
            <th>Participant</th>
        </tr>
    </thead>
    <tbody id="ParticipantList">
        
            <tr>
                <td> </td>
                <td> </td>
                     
                <td>  True</td>
                    
                <td>  False</td>
               
            </tr>
        
    </tbody>
   </table>
</script>

http://jsfiddle.net/mnvqd1jk/86/




Aucun commentaire:

Enregistrer un commentaire