xdomain net::ERR_NAME_NOT_RESOLVED - angularjs

I am writing AngularJS application and using xdomain (https://github.com/jpillora/xdomain) proxy for CORS REST service.
Everything works fine and erros are handled correctly excpet one case - when proxy.html required by xdomain library is not accesible (network or server error)
In that case I get:
GET https://server.test.pl:41012/proxy.html net::ERR_NAME_NOT_RESOLVED
getFrame xdomain.js:520
(anonymous function) xdomain.js:616
facade.send.process xdomain.js:446
facade.send xdomain.js:449
(anonymous function) angular.js:8521
sendReq angular.js:8315
$HttpProvider.$get.serverRequest angular.js:8049
deferred.promise.then.wrappedCallback angular.js:11520
(anonymous function) angular.js:11606
$RootScopeProvider.$get.Scope.$eval angular.js:12632
$RootScopeProvider.$get.Scope.$digest angular.js:12444
$RootScopeProvider.$get.Scope.$apply angular.js:12736
(anonymous function) angular.js:1438
invoke angular.js:3940
doBootstrap angular.js:1436
bootstrap angular.js:1450
(anonymous function) app.js:86
trigger angular.js:2563
(anonymous function) angular.js:2843
forEach angular.js:325
eventHandler angular.js:2842
I want to intercept this error and handle it but problem is I don't know how:
$http catch/error promise method is not called
httInterceptor i wrote is not invoked
How can I hadle this error?

Related

Kendo delete button not working

Kendo is throwing error when trying to delete. It shows confirmation box after OK then it deletes the row, but doesn't call destroy in transport to call Api service.
kendo.all.min.js:52 Uncaught TypeError: Cannot convert undefined or null to object
at init._removeRow (kendo.all.min.js:52)
at init.removeRow (kendo.all.min.js:52)
at HTMLAnchorElement.<anonymous> (kendo.all.min.js:51)
at HTMLDivElement.dispatch (jquery.min.js:3)
at HTMLDivElement.r.handle (jquery.min.js:3)
_removeRow # kendo.all.min.js:52
removeRow # kendo.all.min.js:`enter code here`52
(anonymous) # kendo.all.min.js:51
dispatch # jquery.min.js:3
r.handle # jquery.min.js:3
I got the solution, persistSelection was true. I deleted it. now its working !!

angular.js:11607 TypeError: fn is not a function

I am facing a problem with this link below which I want to use in my code,Its working fine but I am getting one error whenever I click on add fields button.
http://www.shanidkv.com/blog/angularjs-adding-form-fields-dynamically
The Error is as follows,
angular.js:11607 TypeError: fn is not a function
at $parseFunctionCall (angular.js:12346)
at callback (angular.js:21435)
at Scope.$eval (angular.js:14401)
at Scope.$apply (angular.js:14500)
at HTMLFormElement.<anonymous> (angular.js:21440)
at HTMLFormElement.dispatch (jquery-1.9.1.min.js:3)
at HTMLFormElement.v.handle (jquery-1.9.1.min.js:3)

AngularJS unit test pascalprecht.translate not available

Uncaught Error: [$injector:nomod] Module 'pascalprecht.translate' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.3.8/$injector/nomod?p0=pascalprecht.translate
(anonymous function)
(anonymous function)
ensure
module
angular.module
(anonymous function)
(anonymous function)
(anonymous function)
I have included in the index.html :
'../js/angular-translate/*.js',
and in app.module : angular.module('app name', [..,'pascalprecht.translate',])

AngularJS caseInsensitiveMatch not working

I referred to AngularJS + Base Href Case Sensitive? this thread. As per that I should be using 1.1.5 however still I am having the problem.
Angular is still returning the same error.Here is what i am doing.
$routeProvider.otherwise({ redirectTo: '/' , caseInsensitiveMatch : true });
My base Href is /appname/. Now anyone can enter URL like AppName or appName or any combination.
Right now routing works only when URL contains what is given in base href.
Anything I am doing wrong ?
Here is output in console
Uncaught TypeError: Cannot read property '1' of null angular.js:5637
matchUrl angular.js:5637
$$parse angular.js:5704
$get angular.js:6120
invoke angular.js:2931
(anonymous function) angular.js:2771
getService angular.js:2891
invoke angular.js:2909
(anonymous function) angular.js:2771
getService angular.js:2891
invoke angular.js:2909
(anonymous function) angular.js:2775
forEach angular.js:148
createInjector angular.js:2775
resumeBootstrapInternal angular.js:1001
bootstrap angular.js:1017
angularInit angular.js:977
(anonymous function) angular.js:16872
jQuery.Callbacks.fire jquery-1.8.2.js:974
jQuery.Callbacks.self.fireWith jquery-1.8.2.js:1082
jQuery.extend.ready jquery-1.8.2.js:406
DOMContentLoaded jquery-1.8.2.js:83
caseInsensitiveMatch is not in the documentation for Angular 1.1.5. It seems best to upgrade and see if that solves the issue.

Angularjs seems to throw meaningless errors

I keep get error logs like this in the console:
ReferenceError {} angular.min.js:60
(anonymous function) angular.min.js:60
(anonymous function) angular.min.js:51
(anonymous function) angular.min.js:88
m angular.min.js:6
e.$broadcast angular.min.js:88
(anonymous function) angular.min.js:80
i angular.min.js:76
i angular.min.js:76
(anonymous function) angular.min.js:76
e.$eval angular.min.js:86
e.$digest angular.min.js:84
e.$apply angular.min.js:86
e angular.min.js:92
o angular.min.js:95
q.onreadystatechange angular.min.js:96
I can usually debug it myself, but these stack traces are awfully meaningless.. am I doning somthing wrong or is this just the way it is?
i quote the trace provider :
ReferenceError {} angular.min.js:60
(anonymous function) angular.min.js:60
(anonymous function) angular.min.js:51
(anonymous function) angular.min.js:88
a few things , your error seems related to $http or $resource and AJAX. if you are using anonymous callbacks, name them
for instance :
$http.get("/blop")
.success(function _successGet(){})
.error(function _errorGet(){})
that way , you'll have some clues about the stack trace. instead of (anonymous function) you'll get a ref to _successGet or _errorGet.

Resources