mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
parent
f078762d48
commit
45dc9ee7b4
6 changed files with 11 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
@ngdoc error
|
||||
@name ngResource:badargs
|
||||
@name $resource:badargs
|
||||
@fullName Too Many Arguments
|
||||
@description
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
@ngdoc error
|
||||
@name ngResource:badcfg
|
||||
@name $resource:badcfg
|
||||
@fullName Response does not match configured parameter
|
||||
@description
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
@ngdoc error
|
||||
@name ngSanitize:badparse
|
||||
@name $sanitize:badparse
|
||||
@fullName Parsing Error while Sanitizing
|
||||
@description
|
||||
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var ngResourceMinErr = angular.$$minErr('ngResource');
|
||||
var $resourceMinErr = angular.$$minErr('$resource');
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
|
|
@ -449,7 +449,7 @@ angular.module('ngResource', ['ng']).
|
|||
break;
|
||||
case 0: break;
|
||||
default:
|
||||
throw ngResourceMinErr('badargs',
|
||||
throw $resourceMinErr('badargs',
|
||||
"Expected up to 4 arguments [params, data, success, error], got {0} arguments", arguments.length);
|
||||
}
|
||||
|
||||
|
|
@ -474,8 +474,8 @@ angular.module('ngResource', ['ng']).
|
|||
|
||||
if (data) {
|
||||
if ( angular.isArray(data) != !!action.isArray ) {
|
||||
throw ngResourceMinErr('badcfg', 'Error in resource configuration. Expected response' +
|
||||
' to contain an {0} but got an {1}',
|
||||
throw $resourceMinErr('badcfg', 'Error in resource configuration. Expected response' +
|
||||
' to contain an {0} but got an {1}',
|
||||
action.isArray?'array':'object', angular.isArray(data)?'array':'object');
|
||||
}
|
||||
if (action.isArray) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var ngSanitizeMinErr = angular.$$minErr('ngSanitize');
|
||||
var $sanitizeMinErr = angular.$$minErr('$sanitize');
|
||||
|
||||
/**
|
||||
* @ngdoc overview
|
||||
|
|
@ -274,7 +274,7 @@ function htmlParser( html, handler ) {
|
|||
}
|
||||
|
||||
if ( html == last ) {
|
||||
throw ngSanitizeMinErr('badparse', "The sanitizer was unable to parse the following block of html: {0}", html);
|
||||
throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block of html: {0}", html);
|
||||
}
|
||||
last = html;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1061,7 +1061,7 @@ describe('resource', function() {
|
|||
|
||||
expect(successSpy).not.toHaveBeenCalled();
|
||||
expect(failureSpy).toHaveBeenCalledWith(
|
||||
'[ngResource:badcfg] Error in resource configuration. Expected response to contain an array but got an object');
|
||||
'[$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object');
|
||||
});
|
||||
|
||||
it('should fail if action expects an array but response is an object', function() {
|
||||
|
|
@ -1076,7 +1076,7 @@ describe('resource', function() {
|
|||
|
||||
expect(successSpy).not.toHaveBeenCalled();
|
||||
expect(failureSpy).toHaveBeenCalledWith(
|
||||
'[ngResource:badcfg] Error in resource configuration. Expected response to contain an object but got an array');
|
||||
'[$resource:badcfg] Error in resource configuration. Expected response to contain an object but got an array');
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue