mouse0270 / bootstrap-notify

Turns standard Bootstrap alerts into "Growl-like" notifications.
http://bootstrap-notify.remabledesigns.com/
MIT License
2.25k stars 641 forks source link

Angular >2 and angular CLI support #190

Open ltlombardi opened 6 years ago

ltlombardi commented 6 years ago

I decided to put this here, because it would help other developers even if the repo owner doesn't get around to integrating this in the repo documentation.

Your project has to have jquery and bootstrap already installed and working. After that follow this:

  1. in project root, on cmd line, run: npm install bootstrap-notify --save
  2. npm install @types/bootstrap-notify --save
  3. In the file where you want to use it write import * as $ from ‘jquery’; and import 'bootstrap-notify';

You don't need to add the library in angular-cli.json, or index.html.

srihari1988 commented 6 years ago

@ltlombardi Thanks a lot for this. Finally got it working. But the layout seems to be different and there is no animation. Any idea how to fix it?

ltlombardi commented 6 years ago

By the documentation you need to add a third party animation file called Animate.css http://bootstrap-notify.remabledesigns.com/#documentation You need to load this in Angular, just like you did with the Bootstrap css via de angular-cli.json The layout issues I don't know.

srihari1988 commented 6 years ago

Thanks again. It works as expected after adding the animation.css stylesheet

mouse0270 commented 6 years ago

Awesome, I will work on adding this to the documentation.

Thanks for helping out while I took a year-long break looking into other career options