I am trying to use normal jQuery Ajax in anuglarjs .
$.ajax({
type: "POST",
url: window.apirooturl + "/logger",
contentType: "application/json",
data: angular.toJson({
url: $window.location.href,
message: errorMessage,
type: "exception",
stackTrace: stackTrace,
cause: ( cause || "")
})
});
But i am getting an error
Below two messages appears in the firbug
- $ is not defined
- Error: [$rootScope:inprog] $digest already in progress
Do we need to configure something to use normal jquery function in anagularjs? I tried to look on Google but could not get a answer
More information : I am trying to send client side error to the server side and trying to implement a global exception handler as suggested in this post . http://www.bennadel.com/blog/2542-logging-client-side-errors-with-angularjs-and-stacktrace-js.htm