How to get Fragment value from url in Drupal 8?
You could use it like this: 

$path = \Drupal::request()->getpathInfo();
$arg  = explode('/',$path);

It gives:  

Array
(
    [0] => 
    [1] => node
    [2] => add
    [3] => application
)