本文整理匯總了TypeScript中@ionic-native/badge.Badge.clear方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Badge.clear方法的具體用法?TypeScript Badge.clear怎麽用?TypeScript Badge.clear使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類@ionic-native/badge.Badge
的用法示例。
在下文中一共展示了Badge.clear方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
data => {
if (data.success) {
this.events.publish('messageCount', 0);
this.badge.clear();
this.utilService.toast('全部標記為已讀成功');
}
});
示例2: Promise
return new Promise(resolve => {
if (this.platform.is('cordova')) {
// Clear badge.
this.badge.clear();
this.util.setJPushBadge(0);
}
// We're using Angular Http provider to request the data,
// then on the response it'll map the JSON data to a parsed JS object.
// Next we process the data and resolve the promise with the new data.
this.http.get('./assets/mocks/appsservice/load.json')
.subscribe(data => {
// we've got back the raw data, now generate the core schedule data
// and save the data for later reference
// let items = Array.from(data);
this.getNewInformationCount();
resolve(data);
});
});
示例3: loginOut
loginOut() {
this.events.publish('messageCount', 0);
this.storage.clear();
this.badge.clear().then().catch(error => console.log(error));
this.navCtrl.pop();
}