Working angular code