Toastr allows you to globally define container, where toasts are displayed in this way:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ToastrModule, ToastContainerModule } from 'ngx-toastr';
import { AppComponent } from './app.component';
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
ToastrModule.forRoot({ positionClass: 'inline' }), // <-- this
ToastContainerModule, // <-- lines
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
I want to achieve something similar, I want to place these toasts in a specific container but only within one component, so that it doesn't affect the rest of the toasts in the rest of the application. This is a pure component, no module or route.
Is something like this even possible?