无法绑定到 'suggestions',因为它不是 'p-autoComplete' 的已知 属性

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

我已经在 angular 5 项目上安装了 primeng。 我正在使用 p-autoComplete 组件,但现在出现此错误。 我应该如何修复这个错误?

这是我的源代码。

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

一般是导入的问题。检查您的 app.module.ts 文件。

它应该包含这些行:

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


@NgModule({
  imports: [ 
    AutoCompleteModule,
    // ...
 ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})

export class AppModule { }
import { AppComponent }   from './app.component';
import {AutoCompleteModule} from 'primeng/primeng';
// other imports


@NgModule({
  imports: [ 
    AutoCompleteModule,
    // ...
 ],
  exports: [
    AutoCompleteModule
  ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]
})

export class AppModule { }