templating a table row as component

6 views
Skip to first unread message

Stéphane Ancelot

unread,
Jan 29, 2019, 10:13:48 AM1/29/19
to Angular and AngularJS discussion

Hi, 
Is there a way to use a component as row i n a table ?? the next code does not work




<div class="row">
       
<div class="col-md-12">
       
       
<div class="table-responsive" *ngIf="line==0">
         
<h4>Liste</h4>
       
<table id="mytable" class="table table-bordred table-striped">
                   
<thead>                
                   
<th>Mouvement {{listId}} {{editId}}</th>
                   
<th>course</th>
                   
<th>Accel</th>
                   
<th>Vitesse</th>
                   
<th>Decel</th>
                   
<th>temps</th>
                   
<th>Edit</th>
                   
<th>Delete</th>
                   
</thead>
       
</table>    
       
</div>
<div class="table-responsive" >
       
<table id="mytable" class="table table-bordred table-striped">
   
<tbody>
     
<MYCOMPONENT></MYCOMPONENT>
   
</tbody>
   
</table>
 
</div>
 
</div>
 
</div>


Regards,
Steph

Stéphane Ancelot

unread,
Jan 29, 2019, 10:19:13 AM1/29/19
to Angular and AngularJS discussion

Sorry, I corrected the code was wrong...

Le mardi 29 janvier 2019 16:13:48 UTC+1, Stéphane Ancelot a écrit :

Hi, 
Is there a way to use a component as row i n a table ?? the next code does not work




<div class="row">
       
<div class="col-md-12">
       
       
<div class="table-responsive">

         
<h4>Liste</h4>
       
<table id="mytable" class="table table-bordred table-striped">
                   
<thead>                
                   
<th>Mouvement {{listId}} {{editId}}</th>
                   
<th>course</th>
                   
<th>Accel</th>
                   
<th>Vitesse</th>
                   
<th>Decel</th>
                   
<th>temps</th>
                   
<th>Edit</th>
                   
<th>Delete</th>
                   
</thead>
    <tbody>
<MYCOMPONENT></MYCOMPONENT>
   
</tbody>
   
</table>
 
</div>
 
</div>
 
</div>


Regards,
Steph

Sander Elias

unread,
Jan 29, 2019, 11:17:04 AM1/29/19
to Angular and AngularJS discussion
Reply all
Reply to author
Forward
0 new messages