New to sammyjs. We broadly have two modules, one is Server side rendered and another is a de-coupled client app. We have implemented ko and sammy and its working good. But for some requests, I need to pass it on to the server. Is that possible with sammy?
Sammy(function () {
this.get( ".*", function () {
var view = window.location.pathname;
if( view == "/" )
appViewModel.currentView( "home-page" );
else if( view == "/product" )
appViewModel.currentView( "product-page" );
else if( view == "/admin" )
return false; // SSR Page
});
}).run();
The answer turned out to be very simple, just don't capture the request in the first place.