I am absolutely new to Wordpress, PHP and Angularjs so please bear with me.
I have two custom pages, let's call them page-A
and page-B
.
I want to be able to click on a link from page-A
and open page-B
on a new tab passing to it a parameter.
The parameter is a very long string of text, so I think using POST
would be more appropiate.
Note: I am using Angularjs and not JQuery.
These are the things I've been trying with no success:
This opens a new tab with page-B
but doesn let me pass the string parameter that I need:
url = "<?= get_page_link(115) ?>";
window.open(url,'_blank');
This allows me to send the parameter but doesn't open a new tab:
url = "<?= get_page_link(115) ?>";
return $http({
url: "<?= get_page_link(115) ?>",
method: 'POST',
params: {
event_id:event_id,
texto:event.text,
},
data: this.text
});
So my question is: how could I open a new tab to show my custom page
page-B
passing it with a parameter?