Issue
Hey guys I need to place these two buttons next to a name. How can I do that? They always appear below the word.
<ion-list>
<ion-item *ngFor="let service of services">
<h2>{{service.name}}</h2>
<button ion-fab mini color="danger"><ion-icon name="trash"></ion-icon></button>
<button ion-fab mini color="secondary"><ion-icon name="create"></ion-icon></button>
</ion-item>
</ion-list>
Solution
The solution I found was this one:
<ion-list>
<ion-item *ngFor="let service of services | orderBy: 'name'">
<ion-label>{{service.name}}</ion-label>
<button (click)="onActive(service.detalhe.id)" *ngIf="service.isActive" ion-button outline item-right>Desativar</button>
<button (click)="onActive(service.detalhe.id)" *ngIf="!service.isActive" ion-button outline item-right>Ativar</button>
<button (click)="openUpdatePage(service)" ion-fab mini color="secondary" item-right><ion-icon name="create"></ion-icon></button>
<button (click)="deleteService(service)" ion-fab mini color="danger" item-right><ion-icon name="trash"></ion-icon></button>
</ion-item>
Thank you all for the answers!
Answered By - Ygor Fraga
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.