cassette
cassette copied to clipboard
Hogan Template Not Given Enough Info To Invoke Lambdas
In the HoganCompiler, the stringified functions created by calling:
return Hogan.compile(template, { asString: true });
This populates a Hogan.Template instance. This instance only has the r
functions set from the aforementioned step. However, the c
property (a reference to Hogan.Complier), the text
property (the original string), and the options
aren't provided.
Calling Hogan.Complie on the client will property set all of this for you, but it obviously defeats the purpose of precompiling on the server.
What's the correct way to compile the template server side?
Can you update https://github.com/andrewdavey/cassette/blob/v2/src/Cassette.Hogan/HoganCompiler.cs and send me a pull request please?
Has there been an update regarding Hogan and Lambdas? I'm currently struggling to find a way to get around this and can't seem to find a viable solution without including the source files, which would obviously make the precompiler pointless.
I'm currently experimenting with using sectionTags in the compile
call, but that doesn't really seem to do the trick.