Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm start not working after installation of code #381

Closed
amitkpal83 opened this issue Oct 2, 2020 · 5 comments
Closed

npm start not working after installation of code #381

amitkpal83 opened this issue Oct 2, 2020 · 5 comments

Comments

@amitkpal83
Copy link

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
Copy link
Owner

swiety85 commented Oct 3, 2020

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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
Copy link
Owner

swiety85 commented Oct 11, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants