I have a aura and I need to open a custom tab Aura that I already create and send some parameters without send in the URL, because of the possibility that someone change the URL and access data that is not allowed.
I tried this example but I don't want to create a event for that (myEvent variable):
({
doInit: function(component, event, helper) {
var myAttribute = component.get("v.myAttribute");
var sendData = {
param1: 'value1',
param2: 'value2',
myAttribute: myAttribute
};
var myEvent = $A.get("e.c:myevent");
myEvent.setParams({
"sendData": sendData
});
myEvent.fire();
var navService = component.find("navService");
var pageReference = {
type: 'standard__component',
attributes: {
componentName: 'c__MyLWCComponent'
},
state: {
c__receivedData: sendData
}
};
navService.navigate(pageReference);
}
})
How can I achieve this solution and get this parameters in the other aura?