$('body').Layout('init');
ERROR TypeError: data[config] is not a function
at HTMLBodyElement.
at Function.each (jquery-3.4.1.min.js:2)
at k.fn.init.each (jquery-3.4.1.min.js:2)
at k.fn.init._jQueryInterface [as Layout] (adminlte.js:438)
at LoginComponent.ngOnInit (login.component.ts:33)
at checkAndUpdateDirectiveInline (core.js:31910)
at checkAndUpdateNodeInline (core.js:44367)
at checkAndUpdateNode (core.js:44306)
at debugCheckAndUpdateNode (core.js:45328)
at debugCheckDirectivesFn (core.js:45271)
I solved the error by modifying the script in my case was the Layout but note that this error can occur in other components such as ControlSidebar.
In the definition of the Layout to be more specific where the method is defined I made the following modification:
if (config === 'init') {
data ['_' + config] ();
}
The error is that it does not find the init method since it is declared as _init for this reason it generates errors and there other components in which the same scenario is presented
Thanks for reporting this issue, I've fixed it in master repo and added a way to use it without specifing the method (init) like this $('body').Layout();.
hello thank you very much just as a suggestion it would be good to apply the init also the other plugin
Since I still use Treeview ('init');
and it would be nice just to place the parentheses
CardRefresh
Card widget
ControlSidebar
DirectChat PushMenu
Toasts
TodoList;
Treeview;
That's a nice suggestion, I've added a note on the v3.1.0 project.