本文整理匯總了TypeScript中@ionic/storage.Storage.remove方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Storage.remove方法的具體用法?TypeScript Storage.remove怎麽用?TypeScript Storage.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@ionic/storage.Storage
的用法示例。
在下文中一共展示了Storage.remove方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: doLogout
async doLogout() {
this.menuCtrl.enable(false);
try {
await this.googlePlus.logout();
} catch (e) {}
await this.storage.remove(this.uds.STORAGE_USER);
await this.storage.remove(this.uds.STORAGE_REFRESH_TOKEN);
await this.storage.remove(this.uds.STORAGE_ACCESS_TOKEN);
this.router.navigateByUrl("/login");
}
示例2:
data => {
this.items = data;
this.storage.remove('polls');
if (refresher) {
refresher.complete();
}
}
示例3: signout
//çťĺş
signout(): void {
var that = this;
this.storage.remove('token').then(() => {
that.navCtrl.setRoot(LoginPage);
});
}
示例4: resetDB
resetDB(): void {
this.storage.remove('storageLoaded').then(() => {
this.itemsService.removeAll().then(() => {
this.categoriesService.removeAll().then(() => {
location.reload();
});
});
});
}
示例5: delete
/**
* Delete (async) a WaypointPath from the underlying storage
*/
async delete(waypoints: WaypointPath):Promise<any> {
if (typeof waypoints.id === 'undefined') {
return;
}
let waypointsIds = await this.storage.get(SettingsKeys.WAYPOINTS);
waypointsIds.splice(waypointsIds.indexOf(waypoints.id), 1);
await this.storage.set(SettingsKeys.WAYPOINTS, waypointsIds);
await this.storage.remove(waypoints.id);
}
示例6:
handler: data =>{
this.storage.remove("url").then(url =>{
}).then(() =>{
this.storage.set("url",data.url).then(() =>{
}, errorstorage =>{
console.log(errorstorage);
});
}, erroreeliminar =>{
console.log(erroreeliminar);
})
}
示例7: openPage
openPage(pageName: string) {
if (pageName == "signup") {
this.navCtrl.push(SignupPage);
}
if (pageName == "login") {
this.navCtrl.push(LoginPage);
}
if (pageName == 'logout') {
this.storage.remove("userLoginInfo").then(() => {
this.user = {};
this.loggedIn = false;
})
}
if (pageName == 'cart') {
let modal = this.modalCtrl.create(CartPage);
modal.present();
}
}
示例8: removeAll
removeAll() {
return this.storage.remove('items');
}
示例9: remove
public async remove(key: string) {
await this.ready();
return this.storage.remove(this.buildKey(key));
}