I'm currently trying to use AJAX (with jQuery) in my Drupal 8 module in order to reload a page when the user types something in a textfield. I managed to get a full HTML page back but I would like the AJAX function to only get the content of the page (without the whole layout).
How can I achieve that? What shall I change in my controller function in order to render a different view when the request uses AJAX?
I have searched on Google and on the Drupal 8 documentation but I have not found any answer to my question.
Thanks in advance for your help!