Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class HomeComponent {
- public imagesPath: String[] = [];
- constructor(private http: HttpClient) { }
- public async search(e: Event) {
- const input = e.target as HTMLInputElement;
- this.imagesPath = [];
- const response = await firstValueFrom(this.http.get<{data: {imagesPath: String[]}}>
- ('/manga/get', { params : { title: input.value } }).pipe(
- tap(res => {
- console.log(res.data.imagesPath)
- })
- ));
- this.imagesPath = response.data.imagesPath;
- console.log(this.imagesPath);
- console.log(this.imagesPath.length);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement