我需要将两个列表中的普通用户传递给第三个列表.
List<User> listByCity = new ArrayList<User>();
List<User> listByService = new ArrayList<User>();
//initializing listByCity and listByService happens here
.
.
.
List<User> newList = new ArrayList<User>();
newList.addAll(listByCity);
newList.addAll(listByService);
Run Code Online (Sandbox Code Playgroud)
所以我有一个城市的用户列表和另一个提供服务的用户列表,我只需要普通用户,我该怎么做?我刚刚使用'addAll'添加了两个列表,但它不会按我想要的方式工作.
嘿家伙我需要在名字旁边放这两个按钮,我该怎么做?它们总是出现在单词之下.
<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>Run Code Online (Sandbox Code Playgroud)