I am using prerender.io for server side rendering for Angular Single Page Application.
The title and description tags are displayed in page view source as below:
<meta name="description"
content="{{ngMeta.description}}">
<meta name="robots" content="noodp" />
<meta name="robots" content="noindex" />
<link rel="canonical" href="https://www.example.com/">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">
<meta property="og:title" content="{{ngMeta.title}}" />
<meta property="og:description" content="{{ngMeta.description}}" />
<meta property="og:keywords" content="{{ngMeta.keywords}}" />
<meta property="og:url" content="https://www.example.com/"">
<meta property="og:site_name" content="xxx">
But, the rendered page shows the title and description as below:
<meta name="description" content="">
<meta name="robots" content="noodp">
<meta name="robots" content="noindex">
<link rel="canonical" href="https://www.example.com/">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">
<meta property="og:title" content="">
<meta property="og:description" content="">
<meta property="og:keywords" content="">
<meta property="og:url" content="https://www.example.com/">
<meta property="og:site_name" content="xxx">
Also, the description is missing for the site on google search.
Can anyone help me to resolve this?
I removed the line <meta name="robots" content="noindex" />
and I used another plugin called 'angular-update-meta' instead of 'ngMeta'. Now, the google search populates meta description and title.