Implementing REST from angular