public static void RegisterViewEngines(ViewEngineCollection engines) { engines.RemoveAt(0); engines.Add(new NustacheViewEngine(new string[] { "html" }) { RootContext = NustacheViewEngineRootContext.Model }); }
public static void RegisterViewEngines(ViewEngineCollection engines) { engines.RemoveAt(0); engines.Add(new NustacheViewEngine { // Comment out this line to require Model in front of all your expressions. // This makes it easier to share templates between the client and server. // But it also means that ViewData/ViewBag is inaccessible. RootContext = NustacheViewEngineRootContext.Model }); }
public static void SetupViewEngines(ViewEngineCollection engines) { if (engines[0] is WebFormViewEngine) { engines.RemoveAt(0); // WebForm is not used } foreach (var eng in engines) { eng.SetupEngineForSite(); } }
public static void Register(ViewEngineCollection engines) { engines.RemoveAt(0); engines.Add(new HandlebarsViewEngine()); }