Working on controller of angular js application