angularLoad is not defined
Closed this issue · 7 comments
The README's seem to indicate that we should begin with
var app = angular.module('centralCustom', ['angularLoad']);
which looks like it includes the angularLoad service. But, a call to:
angularLoad.loadScript('http://code.jquery.com/jquery-3.1.1.min.js').then(function() {
console.log('JQuery loaded');
}).catch(function(e) {
console.log('error');
});
shows in the javascript console:
custom.js:15 Uncaught ReferenceError: angularLoad is not defined
Do I need to do something else to use this service?
It seems as though no code is functioning when I declare:
var app = angular.module('centralCustom', ['angularLoad']);
External scripts that use app.component
, app.controller
do not work, but when I switch to
var app = angular.module('viewCustom', ['angularLoad']);
they function OK. angularLoad
still isn't working, though.
Not sure what you mean by external scripts.
Regarding angular load - please use as in the example:
app.controller('FullViewAfterController', ['angularLoad', function (angularLoad) {
..........
and in general, why would you want to mix jquery in?
What I meant is any attempt to use angular methods like .component
. Right now I have Javascript Recipe 1 from the link you shared active in my custom.js, which looks like this:
'use strict';
var app = angular.module('centralCustom', ['angularLoad']);
app.component('prmSearchBarAfter', {
template: '<span style="margin-left: 40%;">Hello World</span>'
});
Yet the "hello world" element doesn't appear. When I change the app
line to:
var app = angular.module('viewCustom', ['angularLoad']);
It appears immediately. Should I not use the 'centralCustom'
line? I am trying to develop a CENTRAL_PACKAGE
.
I was experimenting with the CENTRAL_PACKAGE, and I encountered the same problem. The viewCustom
works, but it seems like the centralCustom
module is never loaded. Even something simple like this doesn't seem to work:
angular.module('centralCustom', []).run(function(){
console.log("hello from centralCustom");
});
Hi is somebody here who use primo-explore-dom and primoUI-central-package?
I use node 6 and npm 5 just can't install it. Or there is somebody Who created the Broken Links reporter for Primo?
Thanks for all.