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

Server-side require #498

Closed
qwe2 opened this issue Nov 24, 2015 · 2 comments
Closed

Server-side require #498

qwe2 opened this issue Nov 24, 2015 · 2 comments

Comments

@qwe2
Copy link
Member

qwe2 commented Nov 24, 2015

RequireAttribute only works when including client-side code. It would be nice to have something similar on the server-side too when I don't have an explicit client-side control but just want to include resources.

@Tarmil Tarmil closed this as completed in db7c46f Dec 2, 2015
@JorgeVV
Copy link

JorgeVV commented Sep 6, 2017

@Tarmil Example of this? Don't know what to do with the Web.Require<'resourceT> instance.

Edit: This seems to be the way (Lost the article/post/comment where I read it)

let bootstrap = Doc.WebControl(new Web.Require<Resources.Bootstrap>())
let body : Doc list = // ...
let bodyWithResource = bootstrap :: body 

@Tarmil
Copy link
Member

Tarmil commented Sep 12, 2017

@JorgeVV Indeed, that is the way to go. I added a section about it in the documentation.

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

No branches or pull requests

3 participants