Discussions

Ask a Question
Back to All

How to use it with RequireJS?

I was using the 0.6.3 version and could easily carry angular dependencies, even after the bootstrap as in this example:

.state('intranet.AlterarCMSPublicacao', {
permissao: ['CMS', 'PUBLICACAO_ALTERAR'],
url: '/AlterarCMSPublicacao/:id', views: {
'content': angularAMD.route({
templateUrl: app.dir('modulos/CMS/Publicacao/views/alterar.tpl.html'),
controller: 'AlterarCMSPublicacaoController',
controllerAs: 'vm',
resolve: {
load: ['$ocLazyLoad', function($ocLazyLoad){
return $ocLazyLoad.load(['ckeditor','ng-ckeditor']);
}]
}
})
}
});

Now with version 1.0.8 I get the following error:

Object {_invokeQueue: Array[1], _configBlocks: Array[0], _runBlocks: Array[1], requires: Array[0], name: "ngCkeditor"}

What is the correct way to achieve the same result with the current version?
I'm using: ocLazyLoad.require.js