mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
docs(minErr): add location/isrcharg docs
This commit is contained in:
parent
72dc48ea4d
commit
2c64f3dc17
4 changed files with 12 additions and 7 deletions
9
docs/content/error/location/isrcharg.ngdoc
Normal file
9
docs/content/error/location/isrcharg.ngdoc
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
@ngdoc error
|
||||
@name $location:isrcharg
|
||||
@fullName Wrong $location.search() argument type
|
||||
@description
|
||||
|
||||
To resolve this error, ensure that the first argument for the `$location.search` call is a `string` or an object.
|
||||
You can use the stack trace associated with this error to identify the call site that caused this issue.
|
||||
|
||||
To learn more, please consult the {@link api/ng.$location `$location`} api docs.
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
@ngdoc error
|
||||
@name $location:wpt
|
||||
@fullName Wrong parameter type
|
||||
@description
|
||||
|
|
@ -375,7 +375,7 @@ LocationHashbangInHtml5Url.prototype =
|
|||
} else if (isObject(search)) {
|
||||
this.$$search = search;
|
||||
} else {
|
||||
throw $locationMinErr('wpt', 'First parameter of function must be string or an object.');
|
||||
throw $locationMinErr('isrcharg', 'The first argument of the `$location#search()` call must be a string or an object.');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ describe('$location', function() {
|
|||
it('search() should throw error an incorrect argument', function() {
|
||||
expect(function() {
|
||||
url.search(null);
|
||||
}).toThrow('[$location:wpt] First parameter of function must be string or an object.');
|
||||
}).toThrow('[$location:isrcharg] The first argument of the `$location#search()` call must be a string or an object.');
|
||||
expect(function() {
|
||||
url.search(undefined);
|
||||
}).toThrow('[$location:wpt] First parameter of function must be string or an object.');
|
||||
}).toThrow('[$location:isrcharg] The first argument of the `$location#search()` call must be a string or an object.');
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue