For angularjs code