angular apply's are only need in functions outside of angular