angular function for to dos