check for $$phase in setLoading