<ionic-selectable
    #selectable
    [items]="pages"
    itemTextField="name"
    itemValueField="id"
    [canSearch]="true"
    [title]="'Select a page'"
    [(ngModel)]="value"
    (onClose)="finishEdit()"
>
    <ng-template ionicSelectableItemTemplate let-port="item" let-isPortSelected="itemIsSelected">
        <div [ngStyle]="{ marginLeft: (20 * port.level) + 'px' }">{{ port.name }}</div>
    </ng-template>
</ionic-selectable>