Hi,
Pardon me as am still new to Angular. I am trying to create an Edit Modal for Tenancy. I have created the cshtml and js files. I have added the edit button on the listing page and can get the row id as well. I have added the following code in index.js:
vm.openTenantEditModal = function (tenant) { var modalInstance = $uibModal.open({ templateUrl: '/App/Main/views/tenants/editModal.cshtml', controller: 'app.views.tenants.editModal as vm', backdrop: 'static' }); };
I do hit this function but for some reason the modal is not displayed, no javascript errors are also displayed. In editModal.js I did a consol.log to see if it hits the js file but no luck.
Am i missing something please?
3 Answer(s)
-
0
Hi,
Your code seems correct for opening a modal but in order to edit a tenant you also need to send tenant's id to modal. Maybe this is the problem.
.... backdrop: 'static', resolve: { tenantId: function () { return tenant.id; } } ...
-
0
Hi,
Thanks for the response. There was an error in the js file that was causing the issue but thats sorted out.
-
0
Thanks for the feedback :)