wrap ajax requests with angular apply