create a Modal/Popup on click button using aura method -- w3web.net

How to display a Modal/Popup on click button using aura method in lightning component

Hey guys, today in this post we are going to learn about how to display a Modal/Popup on click button with a form inside a lightning component using aura method.

Files we used in this post example:-

modalPopupaApp.app Lightning Application It is used for call the component to preview on browser.

modalPopupParent.cmp

Lightning Component It is parent component of "childPopup.cmp".

modalPopupParentController.js

Lightning Component Controller It is used for click functionality that gets the value from child component to aura method.
childPopup.cmp Lightning Component It is a child component of "modalPopupParent.cmp" and hold aura method with action method.
childPopupController.js Lightning Component Controller It is used for display and close the Modal/Popup.

Final Output

show modal popup in lightning component -- w3web.net

Other related post that would you like to learn in lightning component.

Step 1:- Create Lightning Application : modalPopupaApp.app

From Developer Console >> File >> New >> Lightning Application

modalPopupaApp.app [Component Application File]

Step 2:- Create Lightning Component : modalPopupParent.cmp

From Developer Console >> File >> New >> Lightning Component

modalPopupParent.cmp [Lightning Component File]

Step 3:- Create Lightning Component : modalPopupParentController.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Controller

modalPopupParentController.js [JavaScript Controller]

Step 4:- Create Lightning Component : childPopup.cmp

From Developer Console >> File >> New >> Lightning Component

childPopup.cmp [Lightning Component File]

Step 5:- Create Lightning Component : childPopupController.js

From Developer Console >> File >> New >> Lightning Component >> JavaScript Controller

childPopupController.js [JavaScript Controller]

Further post that would you like to learn in lightning component.

Hi, This is Vijay behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time.

2 thoughts on “How to display a Modal/Popup on click button using aura method in lightning component”

  1. You’re a beautiful inspiration. It really helps me in any situation. Where I stuck. Many of my friends told me to comment there post but I stuck what I should comment. Finally I got your post it always help me. Thanks for the lovely post.

    Reply

Leave a Comment