Open jonasmalacofilho opened 9 years ago
The only problem I see is how HttpResponse
would be typed in this example. As far as I see, we'd need either to make a macro that would merge anonymous types' definitions, or we'd need to fall through Dynamic. Any ideas?
Since mweb only executes the template after all routes have been executed, it would be nice to have a way to return more than one view but keeping their data separate.
Surely a proper hierarchy can achieve more complex schemes, but even a simple concatenation of multiple views could be useful: this way, the actual data and its auxiliary information (some as variable data on the
<head>
) could be kept separate in the route execution and could be cleanly extracted later by, for instance, a generic html to api converter (that is, a serializer).What do you think?