Angular waitforasync example github. Can be used to wrap an inject call.