mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
Let the union types go forth and multiply
This commit is contained in:
@@ -8,10 +8,18 @@
|
||||
|
||||
declare var $routeProvider: ng.route.IRouteProvider;
|
||||
$routeProvider
|
||||
.when('/projects/:projectId/dashboard',{
|
||||
controller: '',
|
||||
templateUrl: '',
|
||||
caseInsensitiveMatch: true,
|
||||
reloadOnSearch: false
|
||||
})
|
||||
.when('/projects/:projectId/dashboard', {
|
||||
controller: 'I am a string',
|
||||
templateUrl: '',
|
||||
caseInsensitiveMatch: true,
|
||||
reloadOnSearch: false
|
||||
})
|
||||
.when('/projects/:projectId/dashboard', {
|
||||
controller: function() {
|
||||
//Look at me - I'm a function!
|
||||
},
|
||||
templateUrl: '',
|
||||
caseInsensitiveMatch: true,
|
||||
reloadOnSearch: false
|
||||
})
|
||||
.otherwise({redirectTo: '/'});
|
||||
|
||||
2
angularjs/angular-route.d.ts
vendored
2
angularjs/angular-route.d.ts
vendored
@@ -42,7 +42,7 @@ declare module ng.route {
|
||||
* {(string|function()=}
|
||||
* Controller fn that should be associated with newly created scope or the name of a registered controller if passed as a string.
|
||||
*/
|
||||
controller?: any;
|
||||
controller?: string|Function;
|
||||
/**
|
||||
* A controller alias name. If present the controller will be published to scope under the controllerAs name.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user