Last active
October 29, 2019 13:04
-
-
Save ganqqwerty/89ae82599c9e87bc33f80827b818e84c to your computer and use it in GitHub Desktop.
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
@Component({ | |
selector: 'app-totoro', | |
template: `<pre>{{totoroDetails$ | async | json}}</pre>`, | |
}) | |
export class TotoroComponent implements OnInit { | |
totoroDetails$: string; | |
constructor(private http: HttpClient) { | |
} | |
ngOnInit() { | |
this.totoroDetails$ = this.http.get('https://ghibliapi.herokuapp.com/films/58611129-2dbc-4a81-a72f-77ddfc1b1b49').pipe( | |
map(response => response.description)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment