AdminLTE JS compatibility with SPA JavaScript frameworks

Created on 27 Oct 2017  路  3Comments  路  Source: ColorlibHQ/AdminLTE

AdminLTE JS file seems to do a lot of stuff on document-ready state. That works on its own, but problems can/do show up when I use SPA frameworks like Ember.js - not only that main layout of AdminLTE may show up on other than starting routes things like sidebar height maybe a problem as well.

Can the adminlte.js functions be named and accessible so that I can call them when actually needed?

All 3 comments

All of adminte's JS plugins are configurable using the API. Please review the JS docs:
https://adminlte.io/docs/2.4/js-layout

Thanks!

@almasaeed2010 i had similar problem with my angular app where the page height is broken after router navigation.

$('body').layout('fix');

adding this on my template initialization fixed the issue for me.
thanks a lot!

Hi @queuetest, I'm facing the same issue. Adding $('body').layout('fix'); fixed the main layout. But it doesn't fix other elements such as the sidebar's nested elements and the panels minimizations. Did you find a fix for that?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

esaesa picture esaesa  路  3Comments

lenamtl picture lenamtl  路  3Comments

gaea44 picture gaea44  路  3Comments

LeoYong95 picture LeoYong95  路  4Comments

GuxMartin picture GuxMartin  路  3Comments