Back in Drupal 7, I was able to create a link (Ajax enabled) like this:
$page['profile']['links']['videos'] = array(
'#type' => 'link',
'#title' => t('Videos'),
'#href' => 'profile/videos/' . $uid . '/nojs',
'#attributes' => array('class' => array('use-ajax', 'profile-button-videos')),
'#prefix' => '<div class="profile-bio-link button-profile button-profile-video">',
'#suffix' => '</div>',
);
Though there are plenty of examples about how to create a link from a URI, or external URL; and how to attach attributes, I can't find a shred of documentation on how to append something as simple as "nojs" on the end of the URL...
My code so far is this in Drupal 8 (and it works). But, it lacks the /nojs on the end.
Note: I an not using the the Forms API; strictly Render Elements.
$url = Url::fromRoute('people.profile', ['uid' => $uid]);
$render_array['people']['bio'] = [
'#title' => $this->t('Publications link'),
'#type' => 'link',
'#url' => $url,
'#attributes' => array('class' => array('use-ajax', 'profile-button-bio')),
];
The end result should be a link that looks something like this:
/profile/publications/{uid}/nojs