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 add widget #24

Closed waleed-sarwar closed 7 years ago

waleed-sarwar commented 7 years ago

Hi once again,

Is there anyway to add a widget in a dashboard using by (Id) of widget

jaumard commented 7 years ago

Hi,

No it's not possible, and it doesn't make sense because if your widget is already under the dashboard it's already added. You can't put a widget outside the dashboard tag and then add it into the dashboard if it's what you're trying to achieve. In that case you remove the one outside and re create it with same params when you add it to dashboard

waleed-sarwar commented 7 years ago

I've 2 dashboards and i want to remove widget from 1 dashboard which is possible and add into other dashboard

i just tried to get widget from getWidgetById and pass into addItem function but it gives error i also tried to use add widget and it adds into dashboard but while deleting it gives error any other way

image