Is it possible to configure nested routes/views with HapiJS?
For example if we navigate to the following route it would display a list of movies:
{
method: 'GET',
path: '/movies',
handler: function(request, reply) {
return reply.view('movies', {
data: MOVIES_LIST
});
}
}
When we select a movie from that list we navigate to the following route:
{
method: 'GET',
path: '/movies/{movie_id}',
handler: function(request, reply) {
return reply.view('movie', {
data: SELECTED_MOVIE
});
}
}
Then we should render the movie view as nested from the movies route.
UPDATE