update the code of angularjs