I need to open a new modal from a opened modal. I try this in my modal controller to open the new modal.
$scope.ok = function () {
var modalInstance2 = $modal.open({
templateUrl: 'app/portal/modal/result/view/incidentResult.html',
controller: 'incidentResult',
resolve: { items: function () { return $scope.items; } }
});
modalInstance2.result.then(function (selectedItem) {
$scope.selected = selectedItem;
}, function () {
$log.info('Modal dismissed at: ' + new Date());
});