Created
April 2, 2017 22:38
-
-
Save yoelnacho/8906a2cacdab489215d7350813f9f79a to your computer and use it in GitHub Desktop.
Angular2: Service - simple get id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
urlArtista:string = "https://api.spotify.com/v1/artists"; | |
getArtista( id:string ){ | |
let query = `/${ id }`; | |
let url = this.urlArtista + query; | |
return this.http.get( url ) | |
.map( res =>{ | |
console.log( res.json() ); | |
return res.json(); | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment