What is the ionic2 best practice to show loading, alerts and logs?
问题 I'm looking for ionic2 best practice to show loadings, alerts and console logs.. so instead of repeat the code below in each page so I can call it once. For example code to show loading: showLoading() { this.loading = this.loadingCtrl.create({ content: '' }); this.loading.present(); } Is it the best practice to create a provider, and show the loading from the last? or the provider doesn't support loading or something similar ? Thanks. 回答1: I usually create a lib folder (or module if you want)