Implement movie fetching
This commit is contained in:
@@ -1,7 +1,24 @@
|
||||
@page "/favorites"
|
||||
@rendermode InteractiveServer
|
||||
|
||||
<PageTitle>Favorites</PageTitle>
|
||||
|
||||
<h1>TODO</h1>
|
||||
|
||||
<button class="btn btn-primary" @onclick="FaiCose">FaiCose</button>
|
||||
|
||||
@inject OmdbService OmdbService
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
@code {
|
||||
private async Task FaiCose()
|
||||
{
|
||||
await JSRuntime.InvokeVoidAsync("console.log", "Cose fatte!");
|
||||
|
||||
var movies = await OmdbService.FetchMovies("Matrix");
|
||||
var movieDetail = await OmdbService.FetchMovieDetail("tt28228084");
|
||||
|
||||
await JSRuntime.InvokeVoidAsync("console.log", movies);
|
||||
await JSRuntime.InvokeVoidAsync("console.log", movieDetail);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user