-
Hi, A simple example is as follows. The Model has a property called "Items" which is a simple List<string>.
You can see I have deliberately misspelt the property name in the foreach statement. This razor compiles successfully, and when rendered, it results in empty output. What am I missing here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I don't see a If they're saving template files to the database without typed models, then I guess your validation is a bit simple. It would be pretty cool if you shared the full example and contributed it back to the project, as others could probably benefit and improve upon it. For example, ideally you'd use OmniSharp https://github.com/OmniSharp/omnisharp-roslyn and BlazorWASM client-side to get deep intellisense support. It might slow down typing responsiveness, though. But, it would be pretty powerful. You can imagine dragging and dropping from an AST web control elements from the Model into a ProseMirror or Monaco Editor environment. For ProseMirror, most users wouldnt even need to know its Razor. It would just look like a fancy mail merge from MS Office. |
Beta Was this translation helpful? Give feedback.
I don't see a
@model Type
expression here, like this cshtml file in the tests folder hierarchy:https://github.com/toddams/RazorLight/blob/master/tests/RazorLight.Tests/Assets/Files/Partial.cshtml
If they're saving template files to the database without typed models, then I guess your validation is a bit simple.
It would be pretty cool if you shared the full example and contributed it back to the project, as others could probably benefit and improve upon it. For example, ideally you'd use OmniSharp https://github.com/OmniSharp/omnisharp-roslyn and BlazorWASM client-side to get deep intellisense support. It might slow down typing responsiveness, though.
But, it would be pretty powerful. Yo…