更新Angular6中的meta标签不起作用(查看页面源代码)

时间:2018-07-27 07:21:09

标签: angular meta-tags angular6 angular-universal

我们使用Angular 6 Universal App构建了一个网站,“视图页面源”中的Meta标签未更新。 (https://therightdoctors.com/one-more-thing/dr-s-ramakrishnan-additional-professor-cad-stroke-and-renal-diseases-are-on-a-scale-that-is-unbelievable

请检查下面的代码

this.titleService.setTitle('Dr.S Ramakrishnan | TheRightDoctors');

this.meta.updateTag({name: 'description', content:'TheRightDoctors  Dr.S Ramakrishnan After discharge of a STEMI patient… story continues'});

this.meta.updateTag({name: 'keywords', content:'dr s ramakrishnan,dr s ramakrishnan iit madras,Cardiologist, TheRightDoctors, TheRightDoctors.com, the right doctors,Dr. S RamaKrishnan, Dept. of Cardiology, AIIMS, New Delhi'});

            this.meta.updateTag({
              property: 'vr:canonical',
              content: 'https://therightdoctors.com/one-more-thing/dr-s-ramakrishnan-additional-professor-cad-stroke-and-renal-diseases-are-on-a-scale-that-is-unbelievable'
            });

相同的标签显示在检查元素中。请检查下图

enter image description here

0 个答案:

没有答案