Basic rest api working with angular.