For a component with output binding, for example:
angular.module('app').component('myComponent', { templateUrl: 'myComponent.html', bindings: { onSelect: '&' }, controller: class { selectedItems = [];
If used as a tag, I can get the selected elements using this code:
<my-component on-select='$ctrl.select(items)' />
How to achieve the same result using ui.bootstrap uibModal.open ?
This does not work:
$uibModal.open({ component: 'myComponent', resolve: { onSelect: () => (items) => { console.log('parent event handler', items); } } });
Natan source share