chore(build): rename ionic directory to src and update all references in the build process.

This commit is contained in:
Josh Thomas
2016-05-19 13:20:59 -05:00
parent 8470ae04ac
commit c8f760f080
595 changed files with 73 additions and 87 deletions

View File

@@ -0,0 +1,43 @@
import {Component} from '@angular/core';
import {Control, ControlGroup} from '@angular/common';
import {App, Storage, LocalStorage, SqlStorage} from '../../../../../ionic';
@App({
templateUrl: 'main.html'
})
class IonicApp {
constructor() {
this.local = new Storage(LocalStorage);
this.sql = new Storage(SqlStorage);
}
getLocal() {
this.local.get('name').then(value => {
alert('Your name is: ' + value);
});
}
setLocal() {
let name = prompt('Your name?');
this.local.set('name', name);
}
removeLocal() {
this.local.remove('name');
}
getSql() {
this.sql.get('name').then(value => {
alert('Your name is: ' + value);
}, (errResult) => {
console.error('Unable to get item from SQL db:', errResult);
});
}
setSql() {
let name = prompt('Your name?');
this.sql.set('name', name);
}
removeSql() {
this.sql.remove('name');
}
}

View File

@@ -0,0 +1,11 @@
<ion-content padding>
<h2>Local Storage</h2>
<button primary (click)="getLocal()">Get</button>
<button primary (click)="setLocal()">Set</button>
<button primary (click)="removeLocal()">Remove</button>
<h2>SQL Storage</h2>
<button primary (click)="getSql()">Get</button>
<button primary (click)="setSql()">Set</button>
<button primary (click)="removeSql()">Remove</button>
</ion-content>