Closed fairking closed 7 years ago
There's extensions to help with this. They're hidden inside a special namespace so that normal consumers don't accidentally see them and get confused. Just add using FluentBootstrap.Mvc.Internals;
to the top of your file to bring the extensions into scope and you should be able to write something like helper.GetConfig().GetHtmlHelper()
to get your typed HtmlHelper<TModel>
.
As a little side note, the way that HtmlHelper<TModel>
stores the model type for the view is the whole reason FluentBootstrap needs all these crazy generics. The underlying FluentBootstrap code would be so much simpler if it weren't for the need to carry that model type with us everywhere.
Hi everyone.
I'm writing some extensions for my project to simplify my views and to make fluent bootstrap more flexible.![20161116_1657](https://cloud.githubusercontent.com/assets/13495631/20641874/84f68988-b3f9-11e6-9d6b-d17f7c7eb953.png)
How can I get HtmlHelper from FB Config? As I can see it's not a public property
helper.GetConfig().HtmlHelper
.Thanks.