using api with angular works