-
Notifications
You must be signed in to change notification settings - Fork 2
Description
We are trying to implement this angular directive in to our project, but I am facing few issues with the draggabilly and packery included files.
We are using require.js to load the files in AMD manner. We are facing the issues with the these 2 objects [Draggabilly, Packery] coming as null in the below function in packer-angular.js file.
(function (angular, Draggabilly, Packery) {
'use strict';
..........
...........
...........
}
When we tried to debug the Draggabilly and Packery un minified files, we found that both the modules are written their code to work with AMD, CommonJS & ES Harmony patterns as shown below. The below code is extracted from the draggabilly and packery unminified files.
/* globals define: false, module: false, require: false */
if ( typeof define == 'function' && define.amd ) {
// AMD
define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {
factory( window, jQuery );
});
} else if ( typeof module == 'object' && module.exports ) {
// CommonJS
module.exports = factory(
window,
require('jquery')
);
} else {
// browser global
window.jQueryBridget = factory(
window,
window.jQuery
);
}
I would like to know that whether packer-angular.js file is written to handle these kind of scenario's like loading the modules using AMD manner.
I think that packer-angular.js is trying to execute the code before the [Draggabilly, Packery] files are getting loaded.
Please correct me if I am not correct here and could you please let us know whether packer-angular is going to modify to handle these kind of scenarios.
Thanks in advance for your help