valor-software / ng2-select

Angular based replacement for select boxes
http://valor-software.github.io/ng2-select/
MIT License
675 stars 587 forks source link

ng2-select children not show any data #856

Open 253936563 opened 6 years ago

253936563 commented 6 years ago

I want to use ng2-select children, but it can't show any data

253936563 commented 6 years ago

And demo can't show too;

jacobke commented 6 years ago

try this

public items:Array<any> = [
    {
      id: 1,
      text: 'Austria',
      children: [
        {id: 54, text: 'Vienna'}
      ]
    },
    {
      id: 2,
      text: 'Belgium',
      children: [
        {id: 2, text: 'Antwerp'},
        {id: 9, text: 'Brussels'}
      ]
    }
    ]
HigorSilvaRosa commented 6 years ago

Same problem here!

The @jacobke solution not worked for me.

fidelsam1992 commented 6 years ago

Duplicate #922

pooja23 commented 6 years ago

Duplicate #597 Do we have the workaround for adding custom stylings to the parent item? please see the question here.