Skip to content

Commit b10b5dc

Browse files
committed
better readme
1 parent 5b44c57 commit b10b5dc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Examples/AspDotNetCore/Readme.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
1. Add the CompiledHandlebars.ViewEngine.Core and CompiledHandlebars.RuntimeUtils Nuget Package
44
2. Add the CompiledHandlebarsViewEngine to the MVC-Services and configure the ViewLocationFormats.
5-
```
5+
```csharp
66
var ve_options = new CompiledHandlebarsViewEngineOptions()
77
{
88
ViewLocationFormats = new string[] { "~/Views/{1}/{0}.hbs", "~/Views/{0}.hbs", "~/{0}.hbs"
@@ -13,9 +13,9 @@ services.AddMvc().AddViewOptions(options =>
1313
options.ViewEngines.Add(new CompiledHandlebarsViewEngine(typeof(Startup).GetTypeInfo().Assembly, ve_options));
1414
});
1515
```
16-
3. Call the View in the Controller by Name
17-
```
18-
return View("Greet", name);
16+
3. Call the View in the Controller by Name and pass any ViewModel
17+
```csharp
18+
return View("ViewName", viewModel);
1919
```
2020

2121
# Using the HandlebarsCompiler in an asp.net core (.net core) project

0 commit comments

Comments
 (0)