Converting controller#whenProjectIsLoaded from callback to promise