I want to send an ajax request to get jsp/html page for templateurl of modal. I have written by code like this.
var modalInstance = $uibModal.open({
animation: $scope.animationsEnabled,
templateUrl: 'pages/recordingDetailPopup .jsp',
controller: 'FileDetailCtrl',
size: 'lg',
resolve: {
activeRecords: function () {
return inbnoxList;
}
}
});
But I want to do something like thing like this
var modalInstance = $uibModal.open({
animation: $scope.animationsEnabled,
templateUrl: function(){
$http.get('fileDetailJsp');
},
controller: 'FileDetailCtrl',
size: 'lg',
resolve: {
activeRecords: function () {
return inbnoxList;
}
}
});
How can I implement this functionality.Please suggest.
$http.get('fileDetailJsp')return? I guess it's not the template itself. Does the template URL change dynamically? Is this an indirection to return the name of the template to be used...? If so, you'd need something like$http.get('fileDetailJsp').then(function(response) { $uibModal.open(...use something from response...); });