akveo / ngx-admin

Customizable admin dashboard template based on Angular 10+
https://akveo.github.io/ngx-admin/
MIT License
25.28k stars 7.96k forks source link

Tip: Adding a plug-in instant messaging like Toastr #50

Closed romulotorres closed 7 years ago

romulotorres commented 8 years ago

I believe that the inclusion of a plug-in instant messaging could help many people

nnixaa commented 8 years ago

Hi @romulotorres, we do not have such plans now, but we'll be glad if you could provide a PR. As an example you could use this component https://github.com/akveo/ng2-admin/tree/master/src/app/theme/components/baFullCalendar.

  1. add toastr as a requirement into package.json
  2. load js lib like this https://github.com/akveo/ng2-admin/blob/master/src/app/theme/components/baFullCalendar/baFullCalendar.loader.ts
  3. init jquery plugin like this https://github.com/akveo/ng2-admin/blob/master/src/app/theme/components/baFullCalendar/baFullCalendar.component.ts#L19

Let me know if you have any questions.

romulotorres commented 8 years ago

Hello @nnixaa thanks for your reply.

I tried to add Toastr in the project but have not had success. I used this plugin: https://www.npmjs.com/package/angular2-toaster

I created a folder "baToastr" , creating the files as the theme of default, but could not use that way.

The plugin does not need a jquery call, like the calendar , you indicated .

I also tried to add the plugin directly in app.component but received the following message : "No Toaster Containers Have Been initialized to receive toasts."

My beginner's knowledge in angular 2 are not yet sufficient to accomplish my needs . Could you give me a little help with that?

romulotorres commented 8 years ago

Ps: I will be glad for provide a PR if I do this ;)