动态元标题未显示在视图页面源 Angular Universal 中
我们为每个组件使用了标题服务和元服务。磁贴以及元数据仅在元素上更新,并且在查看源页面上不会更新。
this.meta.updateTag({
property: 'og:image',
content: "Image-Link"
});
可能是因为你的index.html中没有
<meta property="og:image" content="your-url">
。
在这种情况下,您可以使用 addTag 而不是 updateTag。