Component : ui-router resolve will not inject into controller, data undefined
问题 I have this problem using resolve with component & ui-router, the data "after" resolving promise are "undefined" in a controller Service: class userService { constructor ($http, ConfigService, authService) { this.$http = $http; this.API_URL = `${ConfigService.apiBase}`; this.authService = authService; } testAuth () { return this.$http.get(this.API_URL + '/test-auth') } getCollaboratores () { return this.$http.get(this.API_URL + '/collaboratores').then( (resolve) => { // promise resolve