Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should add a method to render a bundle directly #1

Open
Shazwazza opened this issue Apr 18, 2013 · 5 comments
Open

Should add a method to render a bundle directly #1

Shazwazza opened this issue Apr 18, 2013 · 5 comments
Assignees

Comments

@Shazwazza
Copy link
Owner

Currently we can make components dependent on a bundle but in some cases people might want to simply render out a bundle directly. This is inline with how ASP.Net optimization works. Would be easy to make in case people want to use CDF in this manner rather than using dependencies.

@ghost ghost assigned Shazwazza Apr 18, 2013
Shazwazza pushed a commit that referenced this issue Aug 20, 2014
@giuunit
Copy link

giuunit commented Sep 26, 2016

Hello,
I don't understand, isn't 'Html.RequiresJsBundle("customjs1");' supposed to render a Bundle directly ?

@Shazwazza
Copy link
Owner Author

This Html.RequiresJsBundle("customjs1") just makes the current page dependent on the bundle, you'd still need to use Html.RenderJsHere to output the script tag, this task is about being able to output the script tag explicitly for a given bundle instead of for all declared dependencies for the page.

@giuunit
Copy link

giuunit commented Sep 26, 2016

It makes sense now - I am new to this library - would an helper that contains both functions (RequiresJsBundle & RenderJsHere) do the trick or is there a part of the bigger picture that I don't see ?

@Shazwazza
Copy link
Owner Author

Yeah, probably something like RenderJsBundleHere("customjs1")

This is more of a nice to have feature, generally RenderJsHere will do everything for you since it will render out all dependencies the correct way that you have declared for your view/control/etc...

@jtemperv
Copy link

jtemperv commented Mar 12, 2020

I would like to render the Application Insights client side tracing in the <head> tag and all the rest of my components js just before </body>. I guess this would be the feature I'm looking for or is there an alternative solution with CDF or other workaround (apart from using the AI code snippet on https://github.com/microsoft/applicationinsights-js#snippet-setup-ignore-if-using-npm-setup)? (fyi inside a Umbraco v8 project).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants