I am trying to pass some model data into a modal window when it is opened. When the user clicks on an element I want to have the modal window open and display more detailed
What worked for me was to create an object within resolve that returns an object that holds the variables that I wanted to share.
resolve: {
shared: function(){
return {
name: 'Spencer',
numbers: [1, 2, 3]
}
}
}
To access the shared object, include it when defining your modal instance controller.
app.controller('ModalInstanceController', function($scope, shared, $uibModalInstance,