Reputation: 3052
The call to change the language using following method causes the error:
$translate.use(language);
The error in console:
angular.js:13294 SyntaxError: Unexpected string
at Object.parse (native)
at fromJson (http://127.0.0.1:8080/bower_components/angular/angular.js:1285:14)
at defaultHttpResponseTransform (http://127.0.0.1:8080/bower_components/angular/angular.js:10175:16)
at http://127.0.0.1:8080/bower_components/angular/angular.js:10266:12
at forEach (http://127.0.0.1:8080/bower_components/angular/angular.js:321:20)
at transformData (http://127.0.0.1:8080/bower_components/angular/angular.js:10265:3)
at transformResponse (http://127.0.0.1:8080/bower_components/angular/angular.js:11054:21)
at processQueue (http://127.0.0.1:8080/bower_components/angular/angular.js:15627:28)
at http://127.0.0.1:8080/bower_components/angular/angular.js:15643:27
at Scope.$eval (http://127.0.0.1:8080/bower_components/angular/angular.js:16895:28)(anonymous function) @ angular.js:13294(anonymous function) @ angular.js:10007processQueue @ angular.js:15635(anonymous function) @ angular.js:15643Scope.$eval @ angular.js:16895Scope.$digest @ angular.js:16711Scope.$apply @ angular.js:17003done @ angular.js:11324completeRequest @ angular.js:11522requestLoaded @ angular.js:11463
2016-03-29 16:53:57.589 angular.js:13294 Broken interceptor detected: Config object not supplied in rejection:
Not sure what's wrong. Please let me know if anyone knows the solution.
Upvotes: 0
Views: 3066
Reputation: 3052
Figured out. The problem was in the localization string file, there was a comma missing after a newly added key-value pair. Silly mistake, but the error from angular was totally different.
Upvotes: 2
Reputation: 5605
Looking at the sourcecode:
'responseError': function(rejection) {
if (!rejection || !rejection.config) {
$log.error('Broken interceptor detected: Config object not supplied in rejection:\n https://github.com/chieffancypants/angular-loading-bar/pull/50');
return $q.reject(rejection);
}
it will throw this error in the interceptor error handler, which probably means that you're doing a request that is failing. Could you open the network tab and have a look at what's happening when you switch languages? The problem should be visible there
Upvotes: 1