Messages - no icon for inline messages

UI Components for Angular
Post Reply
mnstafford
Posts: 1
Joined: 31 Oct 2018, 02:46

16 Nov 2018, 02:18

Hello,

I am trying to use messages for some validation, such as in this example: https://www.primefaces.org/primeng/#/validation

<p-message severity="error" [text]="userform.controls['password'].errors['required'] ? 'Password is required' : userform.controls['password'].errors['minlength'] ? 'Must be longer than 6 characters' : ''"
*ngIf="!userform.controls['password'].valid&&userform.controls['password'].dirty"></p-message>

However, the little 'x' icon is not showing up for me. I also tried a more simple version:

<p-message severity="error" text="Field is required"></p-message>

but got the same results. I have both MessageModule and MessagesModule imported as needed, as well as CommonModule and BrowserModule as others have suggested elsewhere. As in the example above, I get the red field saying "password is required" but no icon.

Has anyone had the same issue or have and idea?

Thanks!

-Mat

yigitfindikli
Posts: 36
Joined: 08 Aug 2018, 14:09

19 Nov 2018, 14:15

Hi,
Can i see your package.json and angular.json file ? Did you import primeicons ?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests