From 19e42b53f01a4d2531ab657878c5efd59523b800 Mon Sep 17 00:00:00 2001 From: Martin McWhorter Date: Fri, 17 Apr 2015 15:36:59 +0100 Subject: [PATCH] Allow annotated DI functions onEnter and onExit allow for annotated functions for DI. Example: onEnter: ['$http', ($http) => { $http.get(...) } ] --- angular-ui-router/angular-ui-router.d.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/angular-ui-router/angular-ui-router.d.ts b/angular-ui-router/angular-ui-router.d.ts index f5dfbeca5..8d42fee7d 100644 --- a/angular-ui-router/angular-ui-router.d.ts +++ b/angular-ui-router/angular-ui-router.d.ts @@ -45,13 +45,15 @@ declare module angular.ui { views?: {}; abstract?: boolean; /** - * Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog. + * Callback function for when a state is entered. Good way to trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to explictly annotate this function, because it won't be automatically annotated by your build tools. */ - onEnter?: Function; + onEnter?: Function|(string|Function)[]; /** * Callback functions for when a state is entered and exited. Good way to trigger an action or dispatch an event, such as opening a dialog. + * If minifying your scripts, make sure to explictly annotate this function, because it won't be automatically annotated by your build tools. */ - onExit?: Function; + onExit?: Function|(string|Function)[]; /** * Arbitrary data object, useful for custom configuration. */