implemented restangular and writing jasmine unit test cases