Merge pull request #24192 from alexwilczewski/master

angular-route otherwise can accept string
This commit is contained in:
Arthur Ozga
2018-03-15 12:43:29 -07:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -40,7 +40,8 @@ $routeProvider
}
})
.otherwise({ redirectTo: '/' })
.otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" });
.otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" })
.otherwise("/");
var current: ng.route.ICurrentRoute;

View File

@@ -138,7 +138,7 @@ declare module 'angular' {
*
* @params Mapping information to be assigned to $route.current.
*/
otherwise(params: IRoute): IRouteProvider;
otherwise(params: IRoute | string): IRouteProvider;
/**
* Adds a new route definition to the $route service.
*