I've written a controller in the script tag in my HTML. When I run the code, the code is executed till the dependency injection, but the callback function is not executed.
I'm not able to figure out what is wrong with this when a similar code runs successfully on other apps I've worked on.
Also, if I call the callback function explicitly then the dependencies injected are not identified.
<script type="text/javascript">
angular.module('DesignPortal.layout', [])
.controller('NgLayoutController', NgLayoutController);
NgLayoutController.$inject = ['$scope'];
function NgLayoutController($scope) {
var loggedUserId = dpConfig.userInfo.id;
}
</script>
The scope injected above is not identified if the function is called explicitly.