Created
January 4, 2018 01:36
-
-
Save crissjm/879ee48ed5123f0b9d97536fff048b2f to your computer and use it in GitHub Desktop.
home.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ion-header> | |
<ion-navbar> | |
<ion-title>Home</ion-title> | |
</ion-navbar> | |
</ion-header> | |
<ion-content padding> | |
<button ion-button full (click)="newPost()"> | |
<ion-icon name="create"></ion-icon> | |
New Post | |
</button> | |
<div *ngIf="posts"> | |
<ion-card *ngFor="let post of posts"> | |
<ion-item> | |
<br/> | |
<h3>{{ post.id }} - {{ post.title }}</h3> | |
</ion-item> | |
<ion-card-content> | |
<p>{{ post.body }}</p> | |
</ion-card-content> | |
<ion-row> | |
<ion-col> | |
<button [disabled]="uid != post.uid" color="secondary" ion-button icon-left clear small (click)="editPost(post.id)"> | |
<ion-icon name="sync"></ion-icon> | |
<div>Update</div> | |
</button> | |
</ion-col> | |
<ion-col> | |
<button [disabled]="uid != post.uid" color="danger" ion-button icon-left clear small (click)="removePost(post.id)"> | |
<ion-icon name="trash"></ion-icon> | |
<div>Remove</div> | |
</button> | |
</ion-col> | |
</ion-row> | |
</ion-card> | |
</div> | |
</ion-content> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment