So if I get the question correct you want to navigate from one component to another on button click if that is the case then you can try checking the below link:
Yes, I want to navigate from one component to other but for this, can I navigate from the Apex controller class of my original component? If so, how do I code in the Apex Controller class for this?
so, we use apex as back end language to interact with objects and to operate on records we usually do not use apex to navigate components we generally do it from the lightning component controller after receiving a response from apex.
I tried searching but I have not found any examples where they are navigating from one lightning component to another using apex in most cases as previously mentioned they were using javascript controller.
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
So if I get the question correct you want to navigate from one component to another on button click if that is the case then you can try checking the below link:
>> https://salesforce.stackexchange.com/questions/135450/how-to-navigate-from-one-lightning-component-to-another-lightning-component
One more simple example is present in the below link:
>> https://www.biswajeetsamal.com/blog/navigate-from-one-lightning-component-to-another-lightning-component/
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.
Yes, I want to navigate from one component to other but for this, can I navigate from the Apex controller class of my original component?
If so, how do I code in the Apex Controller class for this?
I tried searching but I have not found any examples where they are navigating from one lightning component to another using apex in most cases as previously mentioned they were using javascript controller.
Let me know if it helps you and close your query by marking it as the best answer so that it can help others in the future.
Thanks.