-
-
Save gampleman/63bed7b9f089e00a52a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('ui.router').config(['$provide', function($provide) { | |
$provide.decorator('$controller', [ | |
'$delegate', '$state', | |
function($delegate, $state) { | |
// the `later` and `ident` are private angular variables, | |
// that break the app if not present | |
return function(expression, locals, later, ident) { | |
if ($state.$current) { | |
locals = _.extend(locals, $state.$current.locals.globals); | |
} | |
return $delegate(expression, locals, later, ident); | |
} | |
} | |
]); | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment