Пример #1
0
 //Return index.html for unmatched requests so routing is handled on client
 public object Any(FallbackForClientRoutes request)
 {
     return(Request.PathInfo == "/"
         ? Request.GetPageResult("/static")
         : Request.PathInfo.StartsWith("/p/")
             ? Request.GetPageResult("/static-post")
             : new HttpResult(VirtualFileSources.GetFile("index.html")));
 }
Пример #2
0
        public object Any(FallbackForClientRoutes request)
        {
            var path = (request.PathInfo ?? "").Trim('/');

            if (ShowServerHtml())
            {
                return path == ""
                    ? new HttpResult(base.Gateway.Send(new Overview()))
                       {
                           View = "Home"
                       }
            }
            : new HttpResult(base.Gateway.Send(new GetTechnologyStack {
                Slug = request.PathInfo
            }))
            {
                View = "Stack"
            };

            return(AngularJsApp());
        }
Пример #3
0
 //Return index.html for unmatched requests so routing is handled on client
 public object Any(FallbackForClientRoutes request) =>
 new PageResult(Request.GetPage("/"));