I need Full Action Name in Ajax Controller Magento 2.
protected $request;
public function __construct(
...
\Magento\Framework\App\Request\Http $request
) {
$this->request = $request;
}
$action = $this->request->getFullActionName();
This always giving me my ajax controller full action name.
I need ,suppose suppose if iI m on the product page this should give me "catalog_product_view" .
If iI m on search this should display "catalogsearch_result_index".
Please help.