Use a custom toast component
masterTo use a custom UI for your toasts, create a component that extends the base Toast class and register it in the ToastrModule.forRoot() configuration using the toastComponent key. Ensure your custom component is also declared in your @NgModule declarations.
import { ToastrModule } from 'ngx-toastr';
@NgModule({
imports: [
ToastrModule.forRoot({
toastComponent: YourToastComponent, // added custom toast!
}),
],
bootstrap: [App],
declarations: [App, YourToastComponent], // add!
})
class AppModule {}