Setting HandlerFactoryPath breaks ServiceStack.Razor Content Pages

I wanted to limit the web service calls for Service Stack to the ‘/api’ path, which was done by following the directions here: https://github.com/ServiceStack/ServiceStack/wiki/Run-servicestack-side-by-side-with-another-web-framework

After I modified my web.config and set the HandlerFactoryPath
in the AppHost, none of the Razor Pages were rendering anymore. The project is using the ServiceStack AngularJs App VS Template.

Is there a way to set the HandlerFactoryPath and at the same time, render Severstack.Razor templates in a different directory?

Changing the HandlerFactoryPath changes where ServiceStack is mounted. An alternative solution is to prefix each Route with /api which you can do for all [Route] by overriding GetRouteAttributes() in your AppHost, e.g:

public override RouteAttribute[] GetRouteAttributes(System.Type requestType)
{
    var routes = base.GetRouteAttributes(requestType);
    routes.Each(x => x.Path = "/api" + x.Path);
    return routes;
}