Example of restApi with angularjs