如何将类添加到 <body>在 Angular Universal 中? [英] How to add class to <body> in Angular Universal?

查看:29
本文介绍了如何将类添加到 <body>在 Angular Universal 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在 Angular 应用程序的浏览器版本中使用 Rendered2,但它需要 document.body 引用,并且它在服务器渲染上不可用.

We can user Rendered2 in browser version of Angular app but it requires document.body reference and it's not available on server rendering.

platform-b​​rowserTitleMeta 组件,但我想对 有更多的控制code> 部分,比如注入

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆