Resolve using UI Router and pass to a component's controller
问题 How do I resolve a variable with UI Router when I am using a component. This is the route: $stateProvider .state('route', { url: '/route', template: '<my-component user="user"></my-component>', resolve: { user: (Auth) => { return Auth.getCurrentUser().$promise; } } }) This is the component: (function () { class BookingListComponent { constructor(user) { //I want to use the user here but getting the unknown provider error } } angular.module('app') .component('myComponent', { templateUrl: 'my