Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow annotated DI functions
onEnter and onExit allow for annotated functions for DI. Example:

onEnter: ['$http', ($http) => { $http.get(...) } ]
  • Loading branch information
martinmcwhorter committed Apr 17, 2015
1 parent 236bbf4 commit 19e42b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions angular-ui-router/angular-ui-router.d.ts
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 19e42b5

Please sign in to comment.