Akram
Akram

Reputation: 1

How to bind array of object using *ngFor in angular 6

{
    "Search": [
        {
            "name": "akram",
            "roll": 101
        },
        {
            "name": "wasim",
            "roll": 102
        }
    ],
    "total": "two record"
}

I want to print like this:

akram 101
wasim 102

Upvotes: 0

Views: 695

Answers (1)

MrCodingB
MrCodingB

Reputation: 2314

Just use this:

<p *ngFor="let item of object.Search">{{item.name}} {{item.roll}}</p>

See the docs

Upvotes: 5

Related Questions