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

Angular: ng-sortable fails when no ng-repeat is found #267

Closed
doo4bop opened this issue Feb 9, 2015 · 7 comments
Closed

Angular: ng-sortable fails when no ng-repeat is found #267

doo4bop opened this issue Feb 9, 2015 · 7 comments
Labels
enhancement Quality of life changes to existing features
Milestone

Comments

@doo4bop
Copy link

doo4bop commented Feb 9, 2015

Hi,
I'm trying to use the ng-sortable directive but seems only work if I also use a ng-repeat directive within sortable items.

  • This is Sortable
  • It works with Bootstrap...
  • It has support for touch devices.
  • Just drag some elements around.

Error: TypeError: Cannot read property 'nodeValue' of undefined

Is it possible to have the ng-sortable directive without the ng-repeat directive?

Thanks

@doo4bop doo4bop changed the title ng-angular fails when no ng-repeat its found ng-angular fails when no ng-repeat is found Feb 9, 2015
@RubaXa
Copy link
Collaborator

RubaXa commented Feb 9, 2015

Now, no.

@RubaXa RubaXa added enhancement Quality of life changes to existing features angular and removed enhancement Quality of life changes to existing features labels Feb 9, 2015
@RubaXa
Copy link
Collaborator

RubaXa commented Feb 9, 2015

@doo4bop Can you give an example (on jsbin.com) of when you need it?

@doo4bop doo4bop changed the title ng-angular fails when no ng-repeat is found Angular: ng-sortable fails when no ng-repeat is found Feb 9, 2015
@doo4bop
Copy link
Author

doo4bop commented Feb 9, 2015

@RubaXa
Copy link
Collaborator

RubaXa commented Feb 9, 2015

And what sense in this sort?
Only visual change?

@doo4bop
Copy link
Author

doo4bop commented Feb 9, 2015

Yes, this is a simple example, but we need the user to be able to visually sort tiles in a dashboard.

Thanks

RubaXa added a commit that referenced this issue Feb 9, 2015
@RubaXa
Copy link
Collaborator

RubaXa commented Feb 9, 2015

Try ng-sortable-branch
http://jsbin.com/buyiqivaqi/1/edit?html,js,output

But after f5, all items comes back on old positions.

@RubaXa RubaXa added the enhancement Quality of life changes to existing features label Feb 9, 2015
@doo4bop
Copy link
Author

doo4bop commented Feb 9, 2015

Awesome, seems perfect in jsbin.
I will pull then. Thank you

@RubaXa RubaXa added this to the v1.1.0 milestone Feb 11, 2015
@RubaXa RubaXa closed this as completed Feb 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Quality of life changes to existing features
Projects
None yet
Development

No branches or pull requests

2 participants