今天用angular 集成adminLte的时候 ,发现左边侧边栏动画没有展开,然后发现,它APP js tree函数操作的DOM 不对,修改如下
$.AdminLTE.tree = function (menu) {
var _this = this;
var animationSpeed = $.AdminLTE.options.animationSpeed;
$(document).off('click', menu + ' li a')
.on('click', menu + ' li a', function (e) {
//Get the clicked link and the next element
var $this = $(this);
var checkElement = $this.next();
//Check if the next element is a menu and is visible
if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible')) && (!$('body').hasClass('sidebar-collapse'))) {
//Close the menu
checkElement.slideUp(animationSpeed, function () {
//Fix the layout in case the sidebar stretches over the height of the window
//_this.layout.fix();
})