javascript - Add jQuery dependency in angularJs -
how can add jquery-ui.js controller.i'm new ui-router
.state('new_patient', { url: '/newpatient', templateurl: window.localstorage.getitem('contextpath') + '/module/laboratory/newpatient', controller: 'patientcontroller', resolve: { deps: function($q, $rootscope) { var deferred = $q.defer(); var dependencies = ['jquery-ui']; require(dependencies, function() { $rootscope.$apply(function() { deferred.resolve(); }); }); return deferred.promise; } } });
or follows
resolve: { async: ['jquery-ui', function($) { }] }
pls help.. working of accordion.. in advance replies.
.state('new_patient', { url: '/newpatient', templateurl: window.localstorage.getitem('contextpath') + '/module/laboratory/newpatient', controller: 'patientcontroller', resolve: { deps: function ($q){ var defer = $q.defer(); require(['js/core/jquery-ui'], function() { defer.resolve(); }); return defer.promise; } } });
Comments
Post a Comment