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