Angular httpClient returns property does not exist on object
问题 constructor(private http: HttpClient) { } ngOnInit() { this.http.get('url').subscribe(data => { console.log(data); console.log(data.login); }); } } Here, I can see the data with login in console but I get an error saying property login does not exist on data. Is there a workaround for this without using an interface? Because the data I want to get is pretty huge and will probably be modified in the future, so is there any better way? 回答1: The docs state when using HttpClient ... this.http.get