forked from NancyFx/Nancy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NancyFx#669 from grumpydev/RazorErrors
Razor errors
- Loading branch information
Showing
8 changed files
with
279 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@{ | ||
Layout = "razor-layout-error.cshtml"; | ||
} | ||
@section Header | ||
{ | ||
<!-- This comment should appear in the header --> | ||
} | ||
<h1>Hello @Model.FirstName</h1> | ||
<p>This is a sample Razor view!</p> | ||
@section Footer | ||
{ | ||
<p>This is footer content!</p> | ||
<img src='@Url.Content("~/content/face.png")' alt="Face"/> | ||
} |
12 changes: 12 additions & 0 deletions
12
src/Nancy.Demo.Hosting.Aspnet/Views/razor-layout-error.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html> | ||
<head> | ||
<title>Razor View Engine Demo - @Model.FirstName</title> | ||
@RenderSection("Header") | ||
</head> | ||
<body> | ||
<div id="body">@RenderBody()</div> | ||
<div id="Error">@ThisDoesntExist()</div> | ||
<div id="footer">@RenderSection("Footer")</div> | ||
<div id="optional">@RenderSection("Optional", false)</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
149 changes: 149 additions & 0 deletions
149
src/Nancy.ViewEngines.Razor/Resources/CompilationError.html
Large diffs are not rendered by default.
Oops, something went wrong.