ekokotov / object-table

Angular directive to easy create dynamic tables from source or URL with sorting, filtering and pagination. Smart templates and good perfomance
BSD 3-Clause "New" or "Revised" License
171 stars 52 forks source link

ng-if not work #25

Closed krelfallahhichem closed 8 years ago

krelfallahhichem commented 8 years ago

this example not work with me (when i use ng-if condition in td tag) : <td ng-if="item.etat == true">running</td> i need help.

ekokotov commented 8 years ago

Please show me the whole your example. Dataset and your template

krelfallahhichem commented 8 years ago

this is my table

<table object-table
                data="groupes" 
                display="10" 
                headers="N°, Code, Formation, Date début, Effectifs, Etat, Enseignant" 
                fields="id_groupe, code_formation, libelle_formation, date_debut_groupe, nbr, etat_groupe,nom_enseignant,prenom_enseignant"
                sorting="simple"
                resize="true"
                search="true" >
                <tbody>
                    <tr  ng-click="$owner.alleragr(item.id_groupe)">
                        <td>{{item.id_groupe}}</td>
                        <td>{{item.code_formation}}</td>
                        <td>{{item.libelle_formation}}</td>
                        <td>{{item.date_debut_groupe | date:"dd-MM-yyyy"}}</td>
                        <td>{{item.nbr}}</td>
                             <td ng-if="item.etat_groupe == true">EN COURS</td>
                            <td ng-if="item.etat_groupe == false">TERMINE</td>              
                        <td>{{item.nom_enseignant}} {{item.prenom_enseignant}}</td>           
                    </tr>                                        
                </tbody>
            </table> 

etat_groupe is boolean it's work correctly with normal html table and with object-table not work

ekokotov commented 8 years ago

Ok. fixed this thing in new release. Please update library to 0.2.1. And follow this example. (just add non-bindable)

ekokotov commented 8 years ago

Ok. fixed this thing in new release. Please update library to 0.2.1.

2016-01-12 8:22 GMT-08:00 Hichem notifications@github.com:

this is my table

<table object-table data="groupes" display="10" headers="N°, Code, Formation, Date début, Effectifs, Etat, Enseignant" fields="id_groupe, code_formation, libelle_formation, date_debut_groupe, nbr, etat_groupe,nom_enseignant,prenom_enseignant" sorting="simple" resize="true" search="true" >

{{item.id_groupe}} {{item.code_formation}} {{item.libelle_formation}} {{item.date_debut_groupe | date:"dd-MM-yyyy"}} {{item.nbr}} EN COURS TERMINE {{item.nom_enseignant}} {{item.prenom_enseignant}}
        </table>

etat_groupe is boolean

— Reply to this email directly or view it on GitHub https://github.com/ekokotov/object-table/issues/25#issuecomment-170963694 .