ngFor="let user of users" question


Hi all,

When I use in the .html:

<ion-card *ngFor="let user of users">
  <img src="{{ user.field_image }}">

Then the image is on the html page.

There is also a {{ }} but I have to put that in an In-app-browser within a ngoninit in the .ts file, what do I have to do to do that in the right way?:


        const browser = this.iab.create('',{location:'no'});


I have to do more than this in the .ts file?


Hi @RenzoM78 :wave:

Assuming you want to open the link when tapping on the card, maybe you can do something like this:

In the template:

<ion-card *ngFor="let user of users" (click)="openBrowser(">
  <img src="{{ user.field_image }}">

In the page class:

openBrowser(url: string) {
  const browser = this.iab.create(url, { location:'no' });



Hi Rodrigo, thanks for the answer, i will try it. It looks simple in your answer :slight_smile: