angular JS REST SNIPET