While trying to get data from the "resolve" object. I cannot get anything from what is found in the parent component.
Structure
- partner-component
- partner-list-component
Result
Parent code
function partnerCtrl($uibModal, get, role, loader, toastr, $translate) { ...
vm.search = () => {
loader.show();
get.searchUser(vm.userId, vm.type).then((res) => {
if (res.data.d.results.length) {
const modalInstance = $uibModal.open({
animation: true,
ariaLabelledBy: 'modal-title',
ariaDescribedBy: 'modal-body',
component: 'partnerList',
size: 'lg',
resolve: {
items() {
return res.data.d.results;
},
},
});
}
Child code
function partnerListCtrl($scope, uiGridConstants) {
const $ctrl = this;
$ctrl.items = this.resolve.items;
this.gridOptions = {...},
],
data: this.resolve.items,
};
...
}

itemsshould be a named property in your resolve's membersNote that it is an arrow function to ensure
resis still in scope.Lastly, you should be able to have this resolved value injected into your controller's constructor. When declaring the controller, the injection token string is the same as the member name in your resolve object, in this case
"item"