Skip to content

Instantly share code, notes, and snippets.

@TheVishnuKumar
Last active December 9, 2018 05:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheVishnuKumar/ec466fdb5d27e778ff46ce9b633f2fc6 to your computer and use it in GitHub Desktop.
Save TheVishnuKumar/ec466fdb5d27e778ff46ce9b633f2fc6 to your computer and use it in GitHub Desktop.
({
doInit : function(cmp, event, helper) {
var action = cmp.get("c.wishTheBirthDay");
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
cmp.set("v.showBalloons", response.getReturnValue());
}
else if (state === "ERROR") {
var errors = response.getError();
if (errors) {
if (errors[0] && errors[0].message) {
console.log("Error message: " +
errors[0].message);
}
} else {
console.log("Unknown error");
}
}
});
$A.enqueueAction(action);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment