akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.05k stars 1.51k forks source link

Toastr: Can't follow steps from document written #1874

Open BansiPatel92 opened 5 years ago

BansiPatel92 commented 5 years ago

Issue type

I'm submitting a ... (check one with "x")

Issue description

Current behavior:

When I try to follow the steps to use custom toastr of Nebular 4 version in my angular app. I think the document is not properly written step by step. Expected behavior:

When I import service and use module in appmodule file. After that what I have to do in my component to use toastr? Steps to reproduce:

i have followed all the steps from Document, It does nothing Related code:

insert short code snippets here

Other information:

npm, node, OS, Browser

<!--
Node, npm: `node --version` and `npm --version`
OS: Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)
Browser: Chrome/Safari/Firefox/etc?
-->

All the latest versions of Angular , Nodejs, Nebular, Npm Angular, Nebular

<!--
Check your `package-lock.json` or locate a `package.json` in the `node_modules` folder.
-->
BansiPatel92 commented 5 years ago

@nnixaa I have included:

import { NbToastrModule } from "@nebular/theme";

declarations: [ ToastrComponent ]; imports: [ NbToastrModule.forRoot(), ] providers: [ NbToastrService ],

How to use and where to use this following lines: const toastRef: NbToastRef = this.toastrService.show(...); toastRef.close();