Skip to content

Instantly share code, notes, and snippets.

@MasterHans
Created October 12, 2021 07:26
Show Gist options
  • Save MasterHans/ced2bf5b4ebec140a4d7429bff48331a to your computer and use it in GitHub Desktop.
Save MasterHans/ced2bf5b4ebec140a4d7429bff48331a to your computer and use it in GitHub Desktop.
AngularJs - modal windows
function openClientInvoices(templateUrl, clientId) {
return $uibModal.open({
// templateUrl: util.buildUrl('warehouse/sales', {clientId: clientId}),
templateUrl: util.buildUrl('resource/partials/modal', {clientId: clientId}),
controller: function ($uibModalInstance, templateUrl) {
var c = this;
c.templateUrl = templateUrl;
c.dismiss = function () {
$uibModalInstance.dismiss('close');
};
},
size: 'ext',
controllerAs: 'c',
resolve: {
templateUrl: function () {
return util.buildUrl(templateUrl, {clientId: clientId});
},
clientId: function () {
return clientId;
},
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment