Can't bind to 'suggestions' since it isn't a known property of 'p-autoComplete'


I have installed primeng on angular 5 project.
I am using p-autoComplete component but this error occurs now.
How should I do to fix this error?

This is my source code.

<h3 class="first">Basic</h3>
<p-autoComplete [(ngModel)]="country" [suggestions]="filteredCountriesSingle"  (completeMethod)="filterCountrySingle($event)" field="name" [size]="30"
placeholder="Countries" [minLength]="1"></p-autoComplete>


Usually it’s a problem of import. Check your app.module.ts file.

It should contain these lines :

import { AppComponent }   from './app.component';
import {AutoCompleteModule} from 'primeng/autocomplete';
// other imports

  imports: [ 
    // ...
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]

export class AppModule { }

Answered By – Antikhippe

Answer Checked By – Robin (AngularFixing Admin)

Leave a Reply

Your email address will not be published.