Angular CoreUI - Use Toast for global error

Discussão em 'Angular' iniciado por Ragin, Março 30, 2025.

  1. Ragin

    Ragin Guest

    I'm trying to toast an error with coreUI for Angular. Ideally, this should be an injectable component that I can use in other components. There I would like to use something like this.errorHandler.showError(“Whatever”); in case of an error. A separate toast should then be displayed for each error event, which disappears again after a short time (stackable). So far, however, all attempts have failed.

    The only thing I have managed to do is to implement my ErrorToast along the lines of the Dynamic Toast (https://coreui.io/angular/docs/components/toast/#basic-toast). However, the application then only displayed the static HTML, but all dynamic functions (progress, hide) did not work.

    Does anyone have any tips or instructions on how I can best achieve this?

    I am using Angular 19.

    Continue reading...

Compartilhe esta Página