Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 谷歌搜索的Angular 4网站描述_Html_Angular_Seo - Fatal编程技术网

Html 谷歌搜索的Angular 4网站描述

Html 谷歌搜索的Angular 4网站描述,html,angular,seo,Html,Angular,Seo,我已经用Angular 4/5创建了一个网站(非通用)。当我想在谷歌搜索中找到我的网站时,我的网站没有任何描述,只有标题。 有没有办法不使用角度万有引力来改变这一点?我不想要任何seo优化,只是这个描述。你需要在index.html中添加一个“description”元标记。就像下面这个 <meta name="description" content="[Your description goes here]"> 使用下面的链接将您的网站URL添加到Google。 这可能需

我已经用Angular 4/5创建了一个网站(通用)。当我想在谷歌搜索中找到我的网站时,我的网站没有任何描述,只有标题。 有没有办法不使用角度万有引力来改变这一点?我不想要任何seo优化,只是这个描述。

你需要在
index.html
中添加一个“description”元标记。就像下面这个

<meta name="description" content="[Your description goes here]">

使用下面的链接将您的网站URL添加到Google。

这可能需要很短的时间才能在谷歌搜索中体现出来

谷歌文档链接-

您需要在
index.html
中添加一个“description”元标记。就像下面这个

<meta name="description" content="[Your description goes here]">

使用下面的链接将您的网站URL添加到Google。

这可能需要很短的时间才能在谷歌搜索中体现出来

谷歌文档链接-

利用可注入服务

示例用法

import {Component} from '@angular/core';
import {Meta} from '@angular/platform-browser';

@Component({
  selector: 'app-component',
  template: 'my awesome app'
})
export class AppComponent {
  constructor(private meta: Meta) {
    this.meta.addTag({ 
      name: 'description', 
      content: `My site's description that will show in google`
     })
  }
}
利用可注入服务

示例用法

import {Component} from '@angular/core';
import {Meta} from '@angular/platform-browser';

@Component({
  selector: 'app-component',
  template: 'my awesome app'
})
export class AppComponent {
  constructor(private meta: Meta) {
    this.meta.addTag({ 
      name: 'description', 
      content: `My site's description that will show in google`
     })
  }
}

你的应用程序使用角度路由?我投票关闭这个问题,因为它是一个SEO问题以外的主题。它可能是关于主题的,因为不要结束这个问题。Angular有API来添加我答案中提供的元描述标签。是的,我的应用使用路由。你的应用使用Angular路由?我投票关闭这个问题,因为它是一个SEO问题。它可能是关于主题的,因为不要结束这个问题。Angular有API来添加我答案中提供的元描述标记。是的,我的应用程序使用路由。谷歌爬虫程序看不到这些标记。我的应用程序不是服务器端渲染器-这是问题吗?谷歌爬虫程序看不到这些标记。我的应用程序不是服务器端渲染器-这是问题吗?