1

I've created a custom toastr notification component like this:

import { Component, Input } from "@angular/core";
import { Toast, ToastrService, ToastPackage } from "ngx-toastr";
import { trigger } from "@angular/animations";

@Component({
  selector: "app-ribbon",
  templateUrl: "./ribbon.component.html",
  styleUrls: ["./ribbon.component.scss"],
  animations: [
    trigger("flyInOut", []),
  ]
})

export class RibbonComponent extends Toast {
  constructor( protected toastrService: ToastrService, public toastPackage: ToastPackage) {
    super(toastrService, toastPackage);
    }
  }

With it's own css styling. I've configured my app.module file like this:

 imports: [
      ToastrModule.forRoot({
        toastComponent: RibbonComponent,
      })]

And when I try to use the toastr service like this:

 showToaster() {
      this.toastr.success("Message Test");
  }
}

In another component it displays my component but with no message text at all, only the empty component

What's missing here?

pedrodotnet
  • 788
  • 3
  • 16
  • 34

0 Answers0