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,
};
...
}
