mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00

- add spacing between imports - alphabetize imports - removed app.html files in favor of an inline ion-nav - cleaned up config demo so it uses proper syntax - use file name main.html for the first page for the demo - name the app ApiDemoApp and first page ApiDemoPage - replace the ion-toolbars with ion-navbars closes #7019 closes driftyco/ionic-site#647
69 lines
1.5 KiB
HTML
69 lines
1.5 KiB
HTML
<ion-header>
|
|
|
|
<ion-navbar>
|
|
<ion-title>Local Storage</ion-title>
|
|
</ion-navbar>
|
|
|
|
</ion-header>
|
|
|
|
|
|
<ion-content class="local-storage-demo outer-content">
|
|
|
|
<ion-list no-margin>
|
|
<ion-list-header>Add to Local Storage</ion-list-header>
|
|
|
|
<ion-item>
|
|
<ion-label>Key</ion-label>
|
|
<ion-select [(ngModel)]="myItem.key">
|
|
<ion-option *ngFor="let key of keys" [value]="key">
|
|
{{ key }}
|
|
</ion-option>
|
|
</ion-select>
|
|
</ion-item>
|
|
|
|
<ion-item>
|
|
<ion-label>Value</ion-label>
|
|
<ion-select [(ngModel)]="myItem.value">
|
|
<ion-option *ngFor="let value of values" [value]="value">
|
|
{{ value }}
|
|
</ion-option>
|
|
</ion-select>
|
|
</ion-item>
|
|
|
|
</ion-list>
|
|
|
|
<div padding>
|
|
<button block secondary (click)="set()">
|
|
<ion-icon name="add"></ion-icon>
|
|
Add
|
|
</button>
|
|
</div>
|
|
|
|
<ion-list no-margin>
|
|
<ion-list-header>Delete from Local Storage</ion-list-header>
|
|
|
|
<ion-item>
|
|
<ion-label>Key</ion-label>
|
|
<ion-select [(ngModel)]="delKey">
|
|
<ion-option checked>Select a Key</ion-option>
|
|
<ion-option *ngFor="let key of addedKeys" [value]="key">
|
|
{{ key }}
|
|
</ion-option>
|
|
</ion-select>
|
|
</ion-item>
|
|
</ion-list>
|
|
|
|
<div padding>
|
|
<button block danger (click)="remove()">
|
|
<ion-icon name="remove"></ion-icon>
|
|
Delete
|
|
</button>
|
|
</div>
|
|
|
|
<div padding>
|
|
<h5>Local Storage:</h5>
|
|
<pre>local: {{ localStorageDemo | cleanLocalData }}</pre>
|
|
</div>
|
|
|
|
</ion-content>
|