kamilkp / ng-nestable

Angular module for jQuery nestable plugin
http://kamilkp.github.io/ng-nestable
MIT License
62 stars 34 forks source link

Does not display item data in the first run #16

Open mustafabereket opened 8 years ago

mustafabereket commented 8 years ago

Hi,

I am trying to use this nestable, but I have a problem: screen shot 2016-01-21 at 5 43 52 pm

When I first go into the page, it shows the nestable list and its tree fine, however their names doesnt show up. Everything works fine after I refresh the page, but it doesnt work when I first go to the page and I get this error: "root.nestable" is not a function

Any help would be so appreciated. Thanks!

mustafabereket commented 8 years ago

Anyone can help me with this?

juniorfoo commented 8 years ago

I had the same problem - for me it was that wiredep was not adding in the jquery.nestable.* files.

mjaniko commented 8 years ago

i am having same problem, it happens in angular version

Romz commented 8 years ago

Hi mustafabereket.

I had the the same issue. I fixed it by including lib/jquery.nestable.js.

But it seems that $item isn't evaluated.

Romz commented 8 years ago

The variable "$element" in ngNestableItem link function is an instance of jQlite and the data("item") is undefined. using jQuery($element[0]) seems to work.

mustafabereket commented 8 years ago

I already added jquery.nestable.js, so I am curious what is the reason? What else can I do? Can you let me know you there is something else to do?

Romz commented 8 years ago

For me, inlcude the jquery.nestable.js solved "root.nestable is not a function" error. Try to include jquery before the angular.js file. It solves empty list for me.

Romz commented 8 years ago

Finally, i will use this: http://angular-ui-tree.github.io/angular-ui-tree/#/basic-example