From 380e701b39abbd48a435971bb7560974ad43b33e Mon Sep 17 00:00:00 2001 From: Valentyn Shybanov Date: Fri, 4 Dec 2015 13:31:52 +0100 Subject: [PATCH 1/2] Added missing updateParams method According to documentation, `updateParams` method existed even in 1.3 but it was missing in `IRouteService`. Added this missing method. --- angularjs/angular-route.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts index 662b2c11d..63bc75594 100644 --- a/angularjs/angular-route.d.ts +++ b/angularjs/angular-route.d.ts @@ -35,6 +35,16 @@ declare module angular.route { // May not always be available. For instance, current will not be available // to a controller that was not initialized as a result of a route maching. current?: ICurrentRoute; + + /** + * Causes $route service to update the current URL, replacing current route parameters with those specified in newParams. + * Provided property names that match the route's path segment definitions will be interpolated into the + * location's path, while remaining properties will be treated as query params. + * + * @param newParams Object. mapping of URL parameter names to values + */ + updateParams(newParams:{[key:string]:string}); + } From 7610dacad225bc62f0965b8e8af18eaecd69fda0 Mon Sep 17 00:00:00 2001 From: Valentyn Shybanov Date: Fri, 4 Dec 2015 13:36:19 +0100 Subject: [PATCH 2/2] Added return type of updateParams Added required return type of updateParams --- angularjs/angular-route.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/angularjs/angular-route.d.ts b/angularjs/angular-route.d.ts index 63bc75594..5f426d51c 100644 --- a/angularjs/angular-route.d.ts +++ b/angularjs/angular-route.d.ts @@ -43,7 +43,7 @@ declare module angular.route { * * @param newParams Object. mapping of URL parameter names to values */ - updateParams(newParams:{[key:string]:string}); + updateParams(newParams:{[key:string]:string}): void; }