Encountering an issue - the notification seems to be displaying by default at the top, possibly due to CSS properties affecting it?
When I set the position in the module import like so:
imports: [
...
...,
ToastrModule.forRoot(
positionClass: 'toastr-bottom-right'
)
]
However, after this change, the notification appears in the top-left corner without any message. Despite providing a message for when a user logs in incorrectly, only a blank red (error) toastr notification is displayed as shown in the screenshot.
Link to my AppModule: https://i.sstatic.net/l1W2t.png
Below is my component code:
export class NavComponent {
...
...
...
model: any = {};
loggedIn: boolean;
constructor(
private accountService: AccountService,
private router: Router,
private toastr: ToastrService
) { }
...
...
login(){
this.accountService.login(this.model).subscribe(response => {
this.router.navigateByUrl('/agents');
}, errorResponse => {
console.log(errorResponse);
this.toastr.error(errorResponse.eror);
});
}
Currently using Angular 10.