angularjs code fix