Skip to content

[Blazor] Add ability to add/remove link tag in header via code #12413

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

Closed
VR-Architect opened this issue Jul 21, 2019 · 3 comments
Closed

[Blazor] Add ability to add/remove link tag in header via code #12413

VR-Architect opened this issue Jul 21, 2019 · 3 comments
Labels
area-blazor Includes: Blazor, Razor Components question

Comments

@VR-Architect
Copy link

VR-Architect commented Jul 21, 2019

When using dynamic Google fonts, we need to set the link in the header to point to the required font. As our users can change their font dynamically, how can we have the link in the header also changed? As there are over 900 Google fonts, putting them all into the header would not be feasible.

Example:

<link href='https://fonts.googleapis.com/css?family=ABeeZee' rel='stylesheet'>
then use font-family: 'ABeeZee'; for the element

Thanks for the consideration :)

@VR-Architect VR-Architect changed the title [Blazor] Add ability to set link tag in header via code [Blazor] Add ability to add/remove link tag in header via code Jul 21, 2019
@Joe4evr
Copy link

Joe4evr commented Jul 21, 2019

Potential duplicate of #9128.

@blowdart blowdart added the area-blazor Includes: Blazor, Razor Components label Jul 21, 2019
@mkArtakMSFT
Copy link
Contributor

Thanks for contacting us, @VR-Architect .
You should simply use JSInterop for this.

@VR-Architect
Copy link
Author

Actually, just putting the link in the component worked like magic! Guess I should have tried it first

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components question
Projects
None yet
Development

No branches or pull requests

4 participants