Created
December 4, 2024 09:11
-
-
Save zzpzaf/7595c5e7fae6e1d18b12d044fa202111 to your computer and use it in GitHub Desktop.
ang18-SSR-SEO-SupportBlog2-SeoService-renderer-createElement-example1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. . . | |
const script = this.renderer.createElement('script'); | |
this.renderer.setAttribute(script, 'type', 'application/ld+json'); | |
this.renderer.appendChild(script, this.renderer.createText(JSON.stringify(structuredData))); | |
this.renderer.appendChild(this.renderer.selectRootElement('head', true), script); | |
} | |
. . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment