diff --git a/docs/content/error/ngResource/badargs.ngdoc b/docs/content/error/resource/badargs.ngdoc similarity index 93% rename from docs/content/error/ngResource/badargs.ngdoc rename to docs/content/error/resource/badargs.ngdoc index c5f892075ae6..a9a3f213bf46 100644 --- a/docs/content/error/ngResource/badargs.ngdoc +++ b/docs/content/error/resource/badargs.ngdoc @@ -1,5 +1,5 @@ @ngdoc error -@name ngResource:badargs +@name $resource:badargs @fullName Too Many Arguments @description diff --git a/docs/content/error/ngResource/badcfg.ngdoc b/docs/content/error/resource/badcfg.ngdoc similarity index 95% rename from docs/content/error/ngResource/badcfg.ngdoc rename to docs/content/error/resource/badcfg.ngdoc index 071454669e94..82e875048dbd 100644 --- a/docs/content/error/ngResource/badcfg.ngdoc +++ b/docs/content/error/resource/badcfg.ngdoc @@ -1,5 +1,5 @@ @ngdoc error -@name ngResource:badcfg +@name $resource:badcfg @fullName Response does not match configured parameter @description diff --git a/docs/content/error/ngSanitize/badparse.ngdoc b/docs/content/error/sanitize/badparse.ngdoc similarity index 94% rename from docs/content/error/ngSanitize/badparse.ngdoc rename to docs/content/error/sanitize/badparse.ngdoc index 39ba20d780a3..d07c6d62a403 100644 --- a/docs/content/error/ngSanitize/badparse.ngdoc +++ b/docs/content/error/sanitize/badparse.ngdoc @@ -1,5 +1,5 @@ @ngdoc error -@name ngSanitize:badparse +@name $sanitize:badparse @fullName Parsing Error while Sanitizing @description diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 003b41f18cce..57da8f092134 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -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) { diff --git a/src/ngSanitize/sanitize.js b/src/ngSanitize/sanitize.js index 70932899c9a8..8220b1f52f8d 100644 --- a/src/ngSanitize/sanitize.js +++ b/src/ngSanitize/sanitize.js @@ -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; } diff --git a/test/ngResource/resourceSpec.js b/test/ngResource/resourceSpec.js index 19456f01360b..68c1b17112cc 100644 --- a/test/ngResource/resourceSpec.js +++ b/test/ngResource/resourceSpec.js @@ -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'); });