Skip to content

Instantly share code, notes, and snippets.

@saimon24
Created January 24, 2019 04:16
Show Gist options
  • Save saimon24/d0a733cee5f70054c5d8ee3eeaf1649c to your computer and use it in GitHub Desktop.
Save saimon24/d0a733cee5f70054c5d8ee3eeaf1649c to your computer and use it in GitHub Desktop.
<ion-header>
<ion-toolbar color="primary">
<ion-title>My Movie Search</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<ion-searchbar [(ngModel)]="searchTerm" (ionChange)="searchChanged($event)"></ion-searchbar>
<ion-item>
<ion-label>Select Searchtype</ion-label>
<ion-select [(ngModel)]="type" (ionChange)="searchChanged($event)">
<ion-select-option value="">All</ion-select-option>
<ion-select-option value="movie">Movie</ion-select-option>
<ion-select-option value="series">Series</ion-select-option>
<ion-select-option value="episode">Episode</ion-select-option>
</ion-select>
</ion-item>
<ion-list>
<ion-item button *ngFor="let item of (results | async)" [routerLink]="['/', 'movies', item.imdbID]">
<ion-avatar slot="start">
<img [src]="item.Poster" *ngIf="item.Poster != 'N/A'">
</ion-avatar>
<ion-label text-wrap>
<h3>{{ item.Title }}</h3>
{{ item.Year }}
</ion-label>
<ion-icon slot="end" *ngIf="item.Type == 'movie'" name="videocam"></ion-icon>
<ion-icon slot="end" *ngIf="item.Type == 'series'" name="tv"></ion-icon>
<ion-icon slot="end" *ngIf="item.Type == 'game'" name="logo-game-controller-b"></ion-icon>
</ion-item>
</ion-list>
</ion-content>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment