0

I would display some data

 person = [
    {name: 'Jacob', color: 'Red', date: '2015-03-15', info: [
      'info1',
      'info2',
      'info3',
      'info4',
      'info5'
    ]},
    {name: 'Jack', color: 'Red', date: '2017-04-25'}, 
    {name: 'Jared', color: 'Red', date: '2016-11-15'},
];

I know how to display single data but i wonder how to dipslay exactly whole array of info.

  <ul *ngFor="let pers of person">
        <li>
            {{pers.name}} {{pers.color}} {{pers.date}}
        </li>
  </ul>
1
  • 1
    Maybe use google for a next time? There are at least 2 other questions related to yours in SO Commented Dec 3, 2017 at 21:28

1 Answer 1

2

I guess you need this,

  <ul *ngFor="let pers of person">
        <li>
            {{pers.name}} {{pers.color}} {{pers.date}}
             <ul *ngFor="let info of pers.info">
             <li>{{info}}</li>
             </ul>
        </li>
  </ul>

DEMO

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.