Closed amitkpal83 closed 3 years ago
Do you have "angular2gridster" in your package dependencies?
The source of the problem with error item.setPositionsOnItem is not a function angular2gridster
is your own method itemChange
implemented in the app.component.ts.
If you want to to call setPositionsOnItem
you should do it as follows: item.itemComponent.setPositionsOnItem();
.
Change will fix this issue but other will be thrown becuase of setting the item position to null in your code.
Do you have "angular2gridster" in your package dependencies? The source of the problem with error
item.setPositionsOnItem is not a function angular2gridster
is your own methoditemChange
implemented in the app.component.ts. If you want to to callsetPositionsOnItem
you should do it as follows:item.itemComponent.setPositionsOnItem();
. Change will fix this issue but other will be thrown becuase of setting the item position to null in your code.
Hi,
Thank you for responding back. Correct now getting errors for null. The only requirement that i am having is to create dynamic widget and those can be drag and dropped. Can you please share one angular app which is working correctly with basic functionality which is there in the demo. Rest all other things i have seen in the code. Downloaded code is also not working i guess because of custom library which is there in the project.
Regards, Amit
Do you have "angular2gridster" in your package dependencies? The source of the problem with error
item.setPositionsOnItem is not a function angular2gridster
is your own methoditemChange
implemented in the app.component.ts. If you want to to callsetPositionsOnItem
you should do it as follows:item.itemComponent.setPositionsOnItem();
. Change will fix this issue but other will be thrown becuase of setting the item position to null in your code.Hi,
Thank you for responding back. Correct now getting errors for null. The only requirement that i am having is to create dynamic widget and those can be drag and dropped. Can you please share one angular app which is working correctly with basic functionality which is there in the demo. Rest all other things i have seen in the code. Downloaded code is also not working i guess because of custom library which is there in the project.
Regards, Amit
Hi,
Issue is resolved now. Thank you for your help. Appreciated. Will get back if again need your help.
Hi,
Can we store(in database) the widget order with id after user do changes with order of widgets. So that when same user again login we can show the widget in same order.
Regards, Amit
You can use the change
event on the ngx-gridster-item
component to notify the server about the times' positions change.
More info: https://github.com/swiety85/angular2gridster/wiki/API-Documentation#outputs-1
Hi,
I have downloaded the zip file and extracted the code. After running npm install when i am trying to run the application i am getting below issue.
Can you please help me to resolve this?
Also created the new project install angular2gridster and copy paste the app component code. Application is working but there are few exceptions in the code like "item.setPositionsOnItem is not a function angular2gridster" because of which drag and drop is not working. Attaching a project also. angular.zip