This article mainly introduces how to use the zTree plug-in of jQuery in AngularJS. Angular integrates jqLite, but it is not a full version of jQuery, if you need it, you can refer to the AngularJS documents you have been reading for a while. It feels like a good framework and you 'd like to have a chance to try something with it.
JQuery ZTree is a very good JQuery plug-in China, with complete functions and friendly documentation and APIs. This plug-in was often used in previous projects.
Although AngularJS features are very powerful, there are not as many plug-ins on the UI as JQuery, and you can only define extended UI plug-ins through directive. Although some Tree functions based on directive have been provided abroad, but after all, it is not as powerful as ZTree, and Tree is a basic function that is used for a long time in the project.
Therefore, it took a little time to apply ZTree to AngularJS.
Interaction between zTree and background data
First, it must be the introduction of Angularjs scripts on the page, such as modules (e.g. app. js), controller (e.g. controller. js), Angularjs scripts, and use the relevant tags, and then introduce the zTree style package and zTreed script, you can refer to the Code:
Tree menu
<% Include./../include/header.html %> <% include./../include/top-menu.html %>
<% Include./../include/footer.html %>