rework post in angularjs