Bonjour,
J'ai un probleme avec une erreur de syntaxe mais je ne vois pas ce qui poste probleme
L'erreur se trouve à la ligne 8 apres (data:Object) sur la virguleCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 import { Injectable } from '@angular/core'; import {Http} from '@angular/http'; @Injectable() export class SearchmovieService { constructor(private http:Http) { } search(action: (data: Object), title:string, year:number = 0):void{ let y = year ? '&y=${year}':''; let t = title ? '&t=${title}':''; this.http.get('http://www.omdbapi.com/?apikey=xxxxf&t=${t}$y=${y}&plot=full').subscribe( (response)=>{ action(response.json()); }); } }
Il me retourne ceci :
Citation:
10% building modules 0/1 modules 1 active ...yVideo\src\app\site\film\film.module.tsERROR in src/app/site/film/services/searchmovie.service.ts(8,32): error TS1005: '=>' expected.
Sauriez-vous ce qui peut poser probleme ?
Merci d'avance