jquery ui - Require.js: Is it possible to wait multiple objects? -


let say, want load jquery.ui require.js

what object should set waiting in shim? jquery.ui? no, not true.

in case run after first line evaluated - $.ui = $.ui || {}; , no wigets loaded.

what next. have tried wait $.widget. yes, better, because of $.widget() base func loading ui part. but, $.ui.autocomplete still undefined.

hm. what wait next?

some of code require $.widget, have wait predefined widgets.

is possible force require.js wait multiple objects , run different callbacks or way?

edit: or pass multiple values modules depends? edit2: shim config :

 shim: {         'moment_ru': {             deps: ['moment'],             init: function () { moment.lang('ru'); }         },         'knockout': {             exports: 'ko'         },         'knockout_mapping': {             deps: ['knockout'],             exports: 'ko.mapping'         },         'jquery_ui': {             deps: ['jquery' /*, 'jquery_widget'*/],             exports: '$.widget'         },         //'jquery_widget': {         //  deps: ['jquery'],         //  exports: '$.widget'         //},         'ya_maps': {             exports: 'ymaps'         },         'searchhint': {             deps: ['jquery', 'jquery_ui'],             exports: '$.fn.searchhints'         } } 

in case have $.widget exist, $.ui.autocomplete undefined if make

         'jquery_ui': {             deps: ['jquery'],             exports: '$.ui'         },  

i'm having $.widget undefined


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -