I have home page which has one button to create account. On click of save I want to hide my Home page component and open new component. My Account creation component is separate component which I have included on my home page. I am using component to show hide home page but unable to get the boolean value on home page from Account creation page.

My code is:


<aura:component implements="flexipage:availableForAllPageTypes" access="global">
    <aura:handler event="c:BP_NewAccountCreationEvent" action="{!c.getPopUpId}"/>
    <aura:attribute name="ShowNextPage" type="Boolean" default="true"/>
    <aura:if isTrue="{!v.ShowNextPage}"


    myAction : function(component, event, helper) {

    saveAccount : function(component, event, helper) {
        console.log('IN SaveAccount')
        var action = component.get("c.createAccount");
        action.setParams({"newAcc" : component.get("v.newAccount")});
            if (a.getState() === "SUCCESS") {
                component.set("v.ShowNextPage", "false");

                        if (component.isValid()) {
                        component.set("v.body", newCmp);


            } else if (a.getState() === "ERROR") {
                $A.log("Errors", a.getError());


I need ShowNextpage value from this controller to Home page component .

  • 1
    It feels like there's some info missing, where is saveAccount called from? Maybe worth expanding your code to give the full picture – Phil Hawthorn Feb 27 '17 at 8:07

In controller you setting a boolean value as String

component.set("v.ShowNextPage", "false");

You must set a Boolean value as

component.set("v.ShowNextPage", false);
| improve this answer | |
  • @Tushar Mudgal I have edited the post – vignesh Feb 27 '17 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.