diff options
| author | Ken Sheedlo | 2013-08-09 11:14:37 -0700 | 
|---|---|---|
| committer | Igor Minar | 2013-08-09 14:12:04 -0700 | 
| commit | 45dc9ee7b4a1e004f9fb7edde41d4805d1402ffa (patch) | |
| tree | a89e5e4eb46c156a7593901a61eb332595e4be96 | |
| parent | f078762d48d0d5d9796dcdf2cb0241198677582c (diff) | |
| download | angular.js-45dc9ee7b4a1e004f9fb7edde41d4805d1402ffa.tar.bz2 | |
style(minerr): prefer component name as namespace
Closes #3527
| -rw-r--r-- | docs/content/error/resource/badargs.ngdoc (renamed from docs/content/error/ngResource/badargs.ngdoc) | 2 | ||||
| -rw-r--r-- | docs/content/error/resource/badcfg.ngdoc (renamed from docs/content/error/ngResource/badcfg.ngdoc) | 2 | ||||
| -rw-r--r-- | docs/content/error/sanitize/badparse.ngdoc (renamed from docs/content/error/ngSanitize/badparse.ngdoc) | 2 | ||||
| -rw-r--r-- | src/ngResource/resource.js | 8 | ||||
| -rw-r--r-- | src/ngSanitize/sanitize.js | 4 | ||||
| -rw-r--r-- | test/ngResource/resourceSpec.js | 4 | 
6 files changed, 11 insertions, 11 deletions
| diff --git a/docs/content/error/ngResource/badargs.ngdoc b/docs/content/error/resource/badargs.ngdoc index c5f89207..a9a3f213 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 index 07145466..82e87504 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 index 39ba20d7..d07c6d62 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 003b41f1..57da8f09 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 70932899..8220b1f5 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 19456f01..68c1b171 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');    }); | 
