I've tried to inject $q in my controller like this:
app.controller('NodeCtrl', ['Tree', function(Tree, $scope, $element, $q) {
But, $q
is not defined, how can I start using it? I am using Angular 1.4
I've tried to inject $q in my controller like this:
app.controller('NodeCtrl', ['Tree', function(Tree, $scope, $element, $q) {
But, $q
is not defined, how can I start using it? I am using Angular 1.4
You need to inject it as well as add it to your argument list:
app.controller('NodeCtrl', ['Tree', '$scope', '$element', '$q',
function(Tree, $scope, $element, $q) {