use $apply on async operations.