Skip to content

Instantly share code, notes, and snippets.

@Ruivilela
Last active January 6, 2017 15:03
Show Gist options
  • Save Ruivilela/99d91b804cd3732053cfe28c2051f8dc to your computer and use it in GitHub Desktop.
Save Ruivilela/99d91b804cd3732053cfe28c2051f8dc to your computer and use it in GitHub Desktop.
@Injectable()
export class PokedexService {
private baseUrl: string ='https://pokeapi.co/api/v2/';
constructor(private http: Http) { }
getPokemon(index:number) {
return this.http.get(`${this.baseUrl}pokemon/${index}`)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment