I'm looking to include an animation on the screen while waiting for the projects to load.
constructor(
public platform: Platform,
private network: NetworkService,
public navContrl: NavController,
public modalCtrl: ModalController
) {
this.loadProjects();
this.admin = this.network.isUserAdmin();
}
loadProjects() {
this.network.getAllProjects()
.then(projects => this.projs = projects)
.catch(err => this.logout());
}
Initially, I considered using setTimeout as a solution, but I believe there might be a better approach. Any suggestions?