I have some data that looks like this in the console:
Here is a screenshot of the console:
In app.component.html
<div *ngFor="let data of queryResult">
{{data.City}}
</div>
This gives me 1 result when it should give my 615 (See the screenshot of a console.log on the data)
Here is the code in app.component.ts:
async testQuery() {
const qry = 'SELECT * FROM myTable';
await this.mysqlService.db.query(qry, (err , result) => {
if ( err ) {
console.log('err', err);
} else {
this.queryResult = [result];
console.log(this.queryResult);
}
} );
}
How can I make it loop so it show's all of them instead of just 1?