adoconnection / RazorEngineCore

.NET6 Razor Template Engine
MIT License
585 stars 88 forks source link

Does "@addTagHelper" supported ? #81

Open athinboy opened 3 years ago

athinboy commented 3 years ago

Does "@addTagHelper" supported ?Thanks!

            IRazorEngineCompiledTemplate<RazorEngineTemplateBase<JavaMapperConfig>> template
                = razorEngine.Compile<RazorEngineTemplateBase<JavaMapperConfig>>(templateContent, builder =>
                {
                    builder.AddAssemblyReferenceByName("System.Collections");
                    builder.AddAssemblyReference(typeof(CodeUtil)); // by type
                    builder.AddAssemblyReference(typeof(ReverseStrTagHelper)); // by type
                });
kftrans commented 3 years ago

I would really like to use tag helpers with RazorEngineCore

adoconnection commented 3 years ago

Hi, unfortunately its not yet supported.

kftrans commented 2 years ago

Hey @adoconnection - do you have any tips on how this support might be added? I've been trying to debug through asp.net core sources to see exactly where taghelper functionality is crowbarred in, to see if I can do the same with razorenginecore, but am finding it to be quite a dense forest ... If you happen to have investigated and/or given some thought, I'd be glad for any leads :)

adoconnection commented 2 years ago

@kftrans Hi, right now have ho idea :) I belive its similar to sections, like you did in PR. Im still experementing with it, but not much to be honest