Implementing Client side EJS

Let us say there is a homepage of twitter which contains two section.One is menu on the left side and other is the component like search.ejs, homepage.ejs,notification.ejs which we can include directly.But what if we want that on clicking the buttons on the left side of the menu,ejs components on the right side changes.Like if click on search button in the menu on the left hand side,i want that searchpage.ejs should be rendered in right side.
I tried to solve this problem via download client side ejs script
Code:

('.showcontent').empty(); let html = ejs.render('<%-include(\"./components/homepage\")%>'); (".showcontent").html(html);

where showcontent is class name for the right side section where we want to render the components.

But i am facing error of file not found.
The folder components is present inside views which include all the ejs files.