Closed Alexplose closed 1 year ago
Hi @Alexplose, thank you for your great contributions. What is the main reason or benefit for separating render parts? Is it not possible to add the "Dom" feature without separating these?
In a layout file in asp.net core, the scripts tags comes after the RenderBody, then the scripts section is rendered after.
As I'm referencing jquery, datatable and all my js libs after the RenderBody, the way your TagHelper works leads to a JS error as datatable is not yet defined.
So all scripts stuffs must be referenced in the script section to be rendered at the right time when all libs have been loaded.
See this link : https://learn.microsoft.com/en-us/aspnet/core/mvc/views/layout?view=aspnetcore-7.0
Is this clearer?
Hi @Alexplose I can use it in my main project with script priority editing, but it's good that it still has separate options. Thank you. I will be creating and testing tickets for this and dom-related improvements and publishing them as soon as possible.
Hi @Alexplose it is published with 3.7.0 version, By the way, did you miss the _dom property here, because it is possible to set?
Hi @Alexplose it is published with 3.7.0 version, By the way, did you miss the _dom property here, because it is possible to set?
I don't understand, where?
…and allow separated rendering of html & script
it can be used like this :
` @{
`
then :
@section Scripts { @(datatable.RenderScript()) }