Site icon Coding Faster

Prime Ng Toast & Messages

Today I want to show you how to use prime ng toast and message component. This will be a good primeNg toast example. First, we have to install primeng with npm to our angular project. We can do it by running these commands in our node terminal.  I am using VS Code for developing UI projects. So its easy to do it with VSCode.

And we must add MessageService and ToastModule to app.module.ts file.

After installing packages, we must include them in our component.ts file and use it in the functions to show messages.

And we need to call toast component in html file to show messages to user.

Dont forget to add these css codes to angular.json file.

You can have a look at my other post about Top 10 Developer Tools

If you have question do not forget to write from the chat button next to it or from the comment

Exit mobile version