Module template - support for third party components #6153
Unanswered
neilgallacher
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been enjoying my most recent foray into Oqtane having been following the development for some years.
I had an idea that I thought might help others utilizing third party components in their modules.
In the past I have tweaked the source to add support for third party component libraries but obviously knew this wasn't ideal. I therefore wanted to do it the right way and looking through the various historical discussions I eventually found a discussion entry by Shaun indicating the best approach. It took me quite a while to find this valuable guidance and so I wondered if the module template could be modified to include OnAfterRenderAsync in index.razor showing how to wait for third party .js to be available.
The OnAfterRenderAsync could also be left entirely commented out perhaps or with some suitably phrased guidance.
I'm assuming there isn't yet some better way and as I don't think this would contravene principles it might be something that could be adopted to make things a bit easier for those new to the framework?
public override List Resources => new List()
{
new Stylesheet("_content/[Owner].Module.[Module]/Module.css"),
new Script("_content/[Owner].Module.[Module]/Module.js")
// ,new Script("_content/[ThirdPartyComponents].js
};
Beta Was this translation helpful? Give feedback.
All reactions