.search now allows number for paramValue

This commit is contained in:
johnnyreilly
2014-09-05 14:03:19 +01:00
parent 6651c9bed5
commit 4553fe17eb
2 changed files with 13 additions and 1 deletions
+4
View File
@@ -618,6 +618,10 @@ module locationTests {
$location.search('foo', 'yipee');
// => $location
// set foo to 5
$location.search('foo', 5);
// => $location
/*
* From: https://docs.angularjs.org/guide/$location
*/
+9 -1
View File
@@ -747,10 +747,18 @@ declare module ng {
* Change search part when called with parameter and return $location.
*
* @param search New search params
* @param paramValue If search is a string, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted.
* @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted.
*/
search(search: string, paramValue: string): ILocationService;
/**
* Change search part when called with parameter and return $location.
*
* @param search New search params
* @param paramValue If search is a string or a Number, then paramValue will override only a single search property. If paramValue is null, the property specified via the first argument will be deleted.
*/
search(search: string, paramValue: number): ILocationService;
/**
* Change search part when called with parameter and return $location.
*