ng2-ui / auto-complete

Angular Auto Complete component and directive
http://ng2-ui.github.io/auto-complete/
MIT License
279 stars 124 forks source link

Template parse errors: Can't bind to 'source' since it isn't a known property of 'input' #192

Closed nadircan closed 7 years ago

nadircan commented 7 years ago

I installed this package via npm. I added to my app.module. But i am getting this error. I looked plunker example but i didnt solve this issue.

<input ngui-auto-complete  value-property-name="id"
                   display-property-name="name" formControlName="CityId" [source]="continents"
            placeholder="Seçiniz." class="form-control" >
public continents = [{
      id: 1,
      name: 'Asia',
      population: '4,157,300,000'
    }, {
      id: 2,
      name: 'Africa',
      population: '1,030,400,000'
    }, {
      id: 3,
      name: 'Europe',
      population: '738,600, 000'
    }, {
      id: 4,
      name: 'North America',
      population: '461,114,000'
    }, {
      id: 5,
      name: 'South America',
      population: '390,700,000'
    }, {
      id: 6,
      name: 'Australia',
      population: '36,700,000'
    }, {
      id: 7,
      name: 'Antartica',
      population: 0
    }
    ];
kamikaze1945 commented 7 years ago

How You fix this problem?

UPDATE I found solution. I forgote add in my UserModule 'NguiAutoCompleteModule '

import { NguiAutoCompleteModule } from '@ngui/auto-complete';

@NgModule({
  imports: [
    ...,
    NguiAutoCompleteModule,
    ...
  ],
  ...
})
supriyasachdeva commented 6 years ago

Thanx for the great help