I created my own custom widget. But the problem is I can't access the currently logged in user in my widget. I searched for many times but found only 1 solution.
var $injector = self.ctx.$scope.$injector;
var userService = $injector.get('userService');
var userId = userService.getCurrentUser().userId;
But this solution doesn't work for me.