eu81273 / angular.treeview

AngularJS based Treeview (no jQuery)
MIT License
405 stars 223 forks source link

De facto jQuery dependency #2

Closed jchester closed 11 years ago

jchester commented 11 years ago

At line 63, the directive calls element.empty().:

62: //Rendering template.
63: element.empty().html( $compile( template )( scope ) );

This function isn't supplied as part of jqLite. This means that jquery needs to be included in order to use the directive.

Proposed fixes:

  1. Use another technique to clear the DOM children before re-compiling, or
  2. Update the documentation to explicitly state the dependency.
eu81273 commented 11 years ago

Thank you jchester!

I found out that there is no need to use empty().

html() method removes other constructs such as data and event handlers from child elements before replacing those elements with the new content.

The problem is fixed in the 0.1.2.

Thank you once more.