I am using angularjs 1.4, and in one of my angular controller I have to use jQuery. but when I am trying to pass it as dependency, it is not working.
I tried below code, but no success
(function () {
'use strict';
var app= angular.module('app');
app.controller('getUserInfo', ['jQuery',
function($) {
// some logic
}]);
})();
I also tried below code, but no success
(function () {
'use strict';
var app= angular.module('app');
app.controller('getUserInfo', ['$',
function($) {
// some logic
}]);
})();
Can some please guide what I am doing wrong.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…