當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Storage.remove方法代碼示例

本文整理匯總了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");
 }
開發者ID:strandls,項目名稱:biodiv-mobile,代碼行數:10,代碼來源:logout.page.ts

示例2:

 data => {
   this.items = data;
   this.storage.remove('polls');
   if (refresher) {
     refresher.complete();
   }
 }
開發者ID:meumobi,項目名稱:infomobi,代碼行數:7,代碼來源:items.ts

示例3: signout

	//登出
	signout(): void {
		var that = this;

		this.storage.remove('token').then(() => {
			that.navCtrl.setRoot(LoginPage);
		});
	}
開發者ID:qwb0920,項目名稱:ionic-uuchat,代碼行數:8,代碼來源:setting.ts

示例4: resetDB

 resetDB(): void {
   this.storage.remove('storageLoaded').then(() => {
     this.itemsService.removeAll().then(() => {
       this.categoriesService.removeAll().then(() => {
         location.reload();
       });
     });
   });
 }
開發者ID:Ismaestro,項目名稱:Packing-Up,代碼行數:9,代碼來源:preferences.component.ts

示例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);
  }
開發者ID:ianathompson,項目名稱:eDO_ui,代碼行數:14,代碼來源:waypoints.service.ts

示例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);
                  })
                }
開發者ID:EnriqueTun23,項目名稱:pescaderia,代碼行數:13,代碼來源:home.ts

示例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();
    }

  }
開發者ID:arvac,項目名稱:woo,代碼行數:19,代碼來源:menu.ts

示例8: removeAll

 removeAll() {
   return this.storage.remove('items');
 }
開發者ID:Ismaestro,項目名稱:Packing-Up,代碼行數:3,代碼來源:items.service.ts

示例9: remove

  public async remove(key: string) {
    await this.ready();

    return this.storage.remove(this.buildKey(key));
  }
開發者ID:Nodonisko,項目名稱:ionic-cache,代碼行數:5,代碼來源:cache-storage.ts


注:本文中的@ionic/storage.Storage.remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。