Reputation: 317
I am trying to show message using .growl.success()
in my Angular code , it is not getting successful. I have other views and controllers in the same application where growl is working fine.
Error:- TypeError: growl.success is not a function
In my view I have added <div growl=""></div>
My controller is :-
app.controller('defCtrl', ['$scope','$http','growl',function ($scope,$http,growl) {
$scope.allData = {};
$scope.Go = function() {
$http({
method : 'POST',
url : 'url',
data : $scope.allData
}).then(function(data, status, headers, config) {
console.log(data);
growl.success("successfull");
},function (data, status, headers, config) {
growl.error("Something is wrong");
});
};
}]);
I have gone through other posts too , and I found I have all the necessary files already included. Reason my other views are showing growl message perfectly. I don't see any wrong over here. What am I missing?
Upvotes: 0
Views: 913