jaumard / ngx-dashboard

Dashboard library for angular 4 and more
https://jaumard.github.io/ngx-dashboard/demo/demoDist/index.html
MIT License
71 stars 31 forks source link

problem with multiple <dasboard> #23

Closed waleed-sarwar closed 7 years ago

waleed-sarwar commented 7 years ago

Hi,

is it possible to add multiple "dasboard" tag in a single view. i just tried it but click functionality like close is not working on second one "dashboard" tag

is there any solution please share

image

jaumard commented 7 years ago

Hello,

Normally it should work, but I never test this :) Did you reference the second dashboard into your page component ? To call remove on the good dashboard component ?

waleed-sarwar commented 7 years ago

thanks for quick reply

one thing that i don't understand how the first dashboard tag is differ to other can you please tell??

image

jaumard commented 7 years ago

It's just angular stuff, you need to change your html and add #dashboard1 #dashboard2 on your dashboard component and then on your page component you need:

  @ViewChild('dashboard1') dashboard1: DashboardComponent;
  @ViewChild('dashboard2') dashboard2: DashboardComponent;
waleed-sarwar commented 7 years ago

thanks buddy basically i am new in angular4 thats why .... btw it works fine now

jaumard commented 7 years ago

No problem :) just want to be sure it's not a problem with this module as I never test multiple dashboard Glad it works