1
I am using PrimeNg 8.2.9 following the examples here

https://www.primefaces.org/primeng/v8.2 ... #/messages

Getting the following error

Can't bind to 'value' since it isn't a known property of 'p-messages'.

using this in my html

<p-messages [(value)]="msgs" [closable]="false"></p-messages>
<button type="button" (click)="show()">Show</button>
<button type="button" (click)="clear()">Hide</button>

my ts. uses

res.errors.forEach(s => this.msgs.push({ severity: 'error', summary: 'Info Message', detail: s.msg }));

No Idea, please help

Here is my app.module, this has everything I am importing and using

imports of app.module

import { AppComponent } from './app.component';
import { MessagesModule } from 'primeng/messages';
import {MessageModule} from 'primeng/message';



rest of ngModule

   
@NgModule({
  declarations: [
    AppComponent 
    
  ],
  imports: [
    
    MessagesModule ,
    MessageModule
  ],
  providers: [
    Title,
    LookupService,
    AppSettingsService,
    ConfirmationService,
    RoutePermissionService,
    LoginGuardService,
    MessageService 
  ],
  bootstrap: [AppComponent],
  entryComponents: [ModalComponent]
})
export class AppModule { }
China Syndrome
  • 953
  • 12
  • 24

1 Answers1

0

Maybe you forgot to import the necessary modules in app.module :

import {MessagesModule} from 'primeng/messages';
import {MessageModule} from 'primeng/message';

...
@NgModule({
  imports: [
    ...
    MessagesModule,
    MessageModule,
    ...
  ],
  ...
})
...
Elmehdi
  • 1,390
  • 2
  • 11
  • 25