TrackableEntities / EntityFrameworkCore.Scaffolding.Handlebars

Scaffold EF Core models using Handlebars templates.
MIT License
210 stars 53 forks source link

Couldn't add Helper #16

Closed ErenAtolgan closed 6 years ago

ErenAtolgan commented 6 years ago

Hello

Like I said in EF Core power tools https://github.com/ErikEJ/SqlCeToolbox/issues/697

I have a little issue.. I dont know how add a helper I tried to add in Propreties.hbs the following line before then after the call

Handlebars.registerHelper('ifEquals', function(arg1, arg2, options) { return (arg1 == arg2) ? options.fn(this) : options.inverse(this); }); I have issue :

HandlebarsDotNet.HandlebarsRuntimeException: Template references a helper that is not registered. Could not find helper '#ifEquals'

Thank you Best Regards

tonysneed commented 6 years ago

My extension relies on Handlebars. Net, so the helper needs to be registered in C#. It might take me a bit of time to investigate, but there should be a hook. Let me get back to you on this. Thanks in advance for your patience. You might also want to check the documentation on Handlebars.Net.

tonysneed commented 6 years ago

Resolved by #19. See here. /cc @TheDarkBoz

tonysneed commented 6 years ago

Included with RC3 release.