0
Talk guys, all right? So I’m working with Requirejs along with Angularjs, today I needed to work with an Ngnestable lib
But when I try to load the directive into my app as follows:
define(['angularamd', 'angular-uirouter', 'angular-nestable'], function (angularAMD) {
var app = angular.module('appFerramentaria', [
'ui.router',
'ng-nestable'
]);
{...}
});
The following error is returned: This is my Requirejs configuration file (main.js), I believe the error may be in the order in which I am calling the files
require.config({
baseUrl: '/portais/colaborador_novo/assets_novo/js',
urlArgs: "v=" + (new Date()).getTime(),// desenv
paths: {
'jquery': 'jquery.min',
'bootstrap': 'bootstrap-rjs.min',
'angular': 'angular1-7.min',
'angular-uirouter': 'angular-ui-router.min',
'angularamd': 'angularAMD.min',
'jquery.nestable': 'jquery.nestable',
'angular-nestable': 'angular-nestable',
'app': '../../app/views/ferramentaria/app',
},
shim: {
'angular': ['jquery', 'bootstrap'],
'angularamd': ['angular'],
'angular-uirouter': ['angular', 'angularamd'],
'jquery.nestable': ['jquery'],
'angular-nestable': ['jquery.nestable', 'angular']
},
deps: [
'app'
]
});
Thanks in advance, thanks :)