angular2gridster
angular2gridster copied to clipboard
Adding components dynamically
Hi, devs !
Is it possible to add dynamic components inside a gridster container?
Ex: I have 2 components.
Component A, Component B,
I tried using ComponentFactoryResolver, but it does not seem to be interesting because I have to declare <ng-template #container> </ ng-template>.
Would you have another solution?
My idea is to have a List of components where the user can choose one and I add it as gridster item.
Thank you.
The easiest way to do it is to use a library e.g. https://github.com/gund/ng-dynamic-component
Could I add them inside N gridsterItem?
I'll check out this library.
How can I leave the grid? see an example in this gif repair my mouse cursor
Hello,
Notice my gridster container.
When I finish adding the items and close my side menu it apparently can not calculate the size of my container.
it apparently pops up the width of the container and does not consider adding the items in that space
Could this be a bug in my css?
I am using the same settings as your example in the Responsiveness part
My method for adding an item to gridlist
Hard to say... Do you call gridsterComponent.reload()
after the animation of closing and opening side menu is finished?
Hello,
I was able to solve these problems, it was css error was calculating wrong.
The only thing I could not solve was that if I did not have a widget and wanted to drag an item it can not I would have to set a height for the .dashboard but it overrides my other css
This content when I do not have any widget added yet.
And when I drag a new item it does not seem to work.
ex :
Again it's hard to suggest any solution if I don't see your html and css. Maybe try to set min-height
on .gridster-container
..
@julianodev I like your dashboard images, I am trying to do the same thing. Can you please provide like to your demo.
Could I add them inside N gridsterItem?
I'll check out this library.
Any way to get a look at your code? Example?
@julianodev Hi. Could you please update us on what happened? And if you solved it please show us how. :)
@julianodev can you share your code to use dynamic component for gridster