Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 45dc9ee

Browse files
ksheedloIgorMinar
authored andcommitted
style(minerr): prefer component name as namespace
Closes #3527
1 parent f078762 commit 45dc9ee

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

docs/content/error/ngResource/badargs.ngdoc renamed to docs/content/error/resource/badargs.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ngdoc error
2-
@name ngResource:badargs
2+
@name $resource:badargs
33
@fullName Too Many Arguments
44
@description
55

docs/content/error/ngResource/badcfg.ngdoc renamed to docs/content/error/resource/badcfg.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ngdoc error
2-
@name ngResource:badcfg
2+
@name $resource:badcfg
33
@fullName Response does not match configured parameter
44
@description
55

docs/content/error/ngSanitize/badparse.ngdoc renamed to docs/content/error/sanitize/badparse.ngdoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@ngdoc error
2-
@name ngSanitize:badparse
2+
@name $sanitize:badparse
33
@fullName Parsing Error while Sanitizing
44
@description
55

src/ngResource/resource.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var ngResourceMinErr = angular.$$minErr('ngResource');
3+
var $resourceMinErr = angular.$$minErr('$resource');
44

55
/**
66
* @ngdoc overview
@@ -449,7 +449,7 @@ angular.module('ngResource', ['ng']).
449449
break;
450450
case 0: break;
451451
default:
452-
throw ngResourceMinErr('badargs',
452+
throw $resourceMinErr('badargs',
453453
"Expected up to 4 arguments [params, data, success, error], got {0} arguments", arguments.length);
454454
}
455455

@@ -474,8 +474,8 @@ angular.module('ngResource', ['ng']).
474474

475475
if (data) {
476476
if ( angular.isArray(data) != !!action.isArray ) {
477-
throw ngResourceMinErr('badcfg', 'Error in resource configuration. Expected response' +
478-
' to contain an {0} but got an {1}',
477+
throw $resourceMinErr('badcfg', 'Error in resource configuration. Expected response' +
478+
' to contain an {0} but got an {1}',
479479
action.isArray?'array':'object', angular.isArray(data)?'array':'object');
480480
}
481481
if (action.isArray) {

src/ngSanitize/sanitize.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var ngSanitizeMinErr = angular.$$minErr('ngSanitize');
3+
var $sanitizeMinErr = angular.$$minErr('$sanitize');
44

55
/**
66
* @ngdoc overview
@@ -274,7 +274,7 @@ function htmlParser( html, handler ) {
274274
}
275275

276276
if ( html == last ) {
277-
throw ngSanitizeMinErr('badparse', "The sanitizer was unable to parse the following block of html: {0}", html);
277+
throw $sanitizeMinErr('badparse', "The sanitizer was unable to parse the following block of html: {0}", html);
278278
}
279279
last = html;
280280
}

test/ngResource/resourceSpec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ describe('resource', function() {
10611061

10621062
expect(successSpy).not.toHaveBeenCalled();
10631063
expect(failureSpy).toHaveBeenCalledWith(
1064-
'[ngResource:badcfg] Error in resource configuration. Expected response to contain an array but got an object');
1064+
'[$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object');
10651065
});
10661066

10671067
it('should fail if action expects an array but response is an object', function() {
@@ -1076,7 +1076,7 @@ describe('resource', function() {
10761076

10771077
expect(successSpy).not.toHaveBeenCalled();
10781078
expect(failureSpy).toHaveBeenCalledWith(
1079-
'[ngResource:badcfg] Error in resource configuration. Expected response to contain an object but got an array');
1079+
'[$resource:badcfg] Error in resource configuration. Expected response to contain an object but got an array');
10801080
});
10811081

10821082

0 commit comments

Comments
 (0)