Last active
December 30, 2018 03:22
-
-
Save douglascayers/01b9631a96ae7a3bc7cd2f2642ac4faf to your computer and use it in GitHub Desktop.
Sharing JavaScript Code in a Component Bundle, https://douglascayers.com/2018/12/29/sharing-javascript-code-in-lightning-aura-components-and-freezing-javascript-prototypes/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* controller.js */ | |
({ | |
onActionConfirmed: function(component, event, helper) { | |
helper.callServer(); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* helper.js */ | |
({ | |
callServer: function(component) { | |
var action = component.get("c.someApexMethod"); | |
$A.enqueueAction(action); | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* renderer.js */ | |
({ | |
afterRender: function(component, helper) { | |
this.superAfterRender(); | |
helper.callServer(); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment