I have a dialog I want to use in two different places, so I've built a template and a controller trackCtrl for a modal to use. That controller is defined on the settingsApp module which is not the one launching the modal, so I would like to do something like this:
var modalInstance = $modal.open({
templateUrl: 'templates/track.html',
controller: 'settingsApp.trackCtrl'
});
but it fails of course.
What is the best way to solve this problem?
thanks!