I'm working on a Jhipster project with angular 6, and I'm trying to write a code that appears when a certain event happens. I followed this step by step in a different application (a test), and it worked, but when I tried to use it in my project with Jhipster, the notification does not appear .. Does anyone know the right way to do it with jhipster?
I started working in this area a short time ago, and that's why I have doubts with Jhipster.
Jhipster version 0.5.4, ngx-toastr 10.0.2, Angular version 6.2.4
I followed this example: https://blog.jscrambler.com/how-to-create-angular-toastr-notifications/
When things don't appear it's usually because the css stylesheets are not included.
The tutorial you linked tells you to refer to toastr.css
within styles
section of angular.json
. This does not work with JHipster because it's not fully compatible with Angular CLI.
Read your project's README.md
to learn about how to manage dependencies and styles.
Also, JHipster provides also its own toaster JhiAlertService
which is already used to display success or error of API calls using an interceptor. It could be enough for some users.