Replaced JSON api into angular's api