Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Shared Modal #1029


User avatar
0
alukaszewski created

Does the inbuilt modalManager allow me to reference a common modal.cshtml and .js located in the Mpa/Views/Common/Modal folder or do I have to duplicate the modal.cshtml and .js files into each view folder I want to initiate the modal? Example: I have a modal to display information about a computer, but I want to open this modal from many different views - but I don't want to maintain/update ComputerModal.cshtml in all view folders.


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You dont have to duplicate your modals. Just give their full path to modal manager.

    See below example;

    new app.ModalManager({
    	viewUrl: abp.appPath + 'Mpa/OrganizationUnits/CreateModal',
    	scriptUrl: abp.appPath + 'Areas/Mpa/Views/OrganizationUnits/_CreateModal.js',
    	modalClass: 'CreateOrganizationUnitModal'
    });