From 4553fe17eb96956d3b38f41e9b9340d38ab911ee Mon Sep 17 00:00:00 2001 From: johnnyreilly Date: Fri, 5 Sep 2014 14:03:19 +0100 Subject: [PATCH] .search now allows number for paramValue --- angularjs/angular-tests.ts | 4 ++++ angularjs/angular.d.ts | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/angularjs/angular-tests.ts b/angularjs/angular-tests.ts index 4be1f536c..ad1eef90c 100644 --- a/angularjs/angular-tests.ts +++ b/angularjs/angular-tests.ts @@ -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 */ diff --git a/angularjs/angular.d.ts b/angularjs/angular.d.ts index e18e7b299..bd6bd01cb 100755 --- a/angularjs/angular.d.ts +++ b/angularjs/angular.d.ts @@ -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. *