Identifier ‘image’ is not defined. ‘never’ does not contain such a member
I had already done this before but now I am facing this error. I had tried using "?" and "!!" but still not fixing. What is this and how to fix this..
html
<div class="container" *ngFor="let data of data">
<a href="{{ data.url }}"> //error in url ( Identifier 'url' is not defined. 'never' does not contain such a member )
<img src="{{ data.image }}"> // error in image ( Identifier 'image' is not defined. 'never' does not contain such a member )
</a>
</div>
ts file
import { Component, OnInit } from '@angular/core';
import { ApiService } from 'src/app/services/api.service';
@Component({
selector: 'app-technology',
templateUrl: './technology.component.html',
styleUrls: ['./technology.component.css']
})
export class TechnologyComponent implements OnInit {
data = [];
constructor(private apiservice : ApiService) { }
ngOnInit() {
this.apiservice.getTechUrl().subscribe(async (data : any) => {
this.data = await data.articles
})
}
}
Source: Angular Questions