本文整理汇总了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));
}