Open
Description
How would I use this to just render templates with?
We're building an MVC site.
We'd like to streamline to use one template format. (rather than needing to know Razor, Angular, others)
Trying to look a feasibility of doing this with angular, but we don't need a entire angular app to run - we just want to be able to ad-hoc specify a template path and a data object - that's it.
In Razor I can do something like:
var viewResult = _razorViewEngine.GetView("~", viewPath, false);
....
var viewContext = new ViewContext(
actionContext,
viewResult.View,
viewDictionary,
new TempDataDictionary(actionContext.HttpContext, _tempDataProvider),
sw,
new HtmlHelperOptions()
);
await viewResult.View.RenderAsync(viewContext);
...
Any help would be appreciated.