swiety85 / angular2gridster

Angular implementation of well known Gridster (no jQuery, no external libraries, only Angular and Rx.js).
https://swiety85.github.io/angular2gridster/
MIT License
203 stars 75 forks source link

npm start not working after installation of code #381

Closed amitkpal83 closed 4 years ago

amitkpal83 commented 4 years ago

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.

image

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

swiety85 commented 4 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.

amitkpal83 commented 4 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.

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

amitkpal83 commented 4 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.

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.

amitkpal83 commented 4 years ago

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

swiety85 commented 4 years ago

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