Navigation to an Aura Component from a Lightning Web Component
Teja -
At times we do have to navigate the user to an Aura Component from Lightning Web Component.
Let's look at how something like that can be done.
Template file is going to be pretty much straightforward. We will be having a button and on click of the button user gets navigated.
This here is the template file (check the comments for the steps involved).
In the Aura Component, we need to invoked the init handler, because when the component is initialized we need to strip the data from the URL.
Here is the controller of the Aura Component.
You need to use the notation component.get('v.pageReference') and pageReference is a special type of attribute and we don't have to create an attribute with the name pageReference.