mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
AngularJS: IRoute has been union typed
This commit is contained in:
1 parent
9fc7f5794c
commit
30ce45e0e7
2 files changed
+22
-11
No files matched your search
@@ -10,16 +10,27 @@ declare var $routeProvider: ng.route.IRouteProvider;
|
||||
$routeProvider
|
||||
.when('/projects/:projectId/dashboard', {
|
||||
controller: 'I am a string',
|
||||
templateUrl: '',
|
||||
templateUrl: "So am I",
|
||||
caseInsensitiveMatch: true,
|
||||
reloadOnSearch: false
|
||||
})
|
||||
.when('/projects/:projectId/dashboard', {
|
||||
controller: function() {
|
||||
.when('/projects/:projectId/dashboard2', {
|
||||
controller: function () {
|
||||
//Look at me - I'm a function!
|
||||
},
|
||||
templateUrl: '',
|
||||
caseInsensitiveMatch: true,
|
||||
reloadOnSearch: false
|
||||
template: function ($routeParams?: ng.route.IRouteParamsService) {
|
||||
return "I return a string"
|
||||
}
|
||||
})
|
||||
.otherwise({redirectTo: '/'});
|
||||
.when('/projects/:projectId/dashboard3', {
|
||||
controllerAs: 'I am a string',
|
||||
template: "Yup. String"
|
||||
})
|
||||
.when('/projects/:projectId/dashboard4', {
|
||||
controller: 'I am a string',
|
||||
templateUrl: function ($routeParams?: ng.route.IRouteParamsService) {
|
||||
return "I return a string"
|
||||
}
|
||||
})
|
||||
.otherwise({ redirectTo: '/' })
|
||||
.otherwise({ redirectTo: ($routeParams?: ng.route.IRouteParamsService, $locationPath?: string, $locationSearch?: any) => "" });
|
||||
Reference in new issue
Block a user