question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

support for canonical tags

See original GitHub issue

Hi,

How do I make the canonical tag change. I’ve got the title, description and keywords changing ok.

Do I simply do this:

 {
    path: 'home',
    component: HomeComponent,
    data: {
      meta: {
        title: 'Home page',
        description: 'Description of the home page', 
        canonical: 'mywebsite.com/home' 
      }
    }
  }

I’m using angular version 4, with webpack, typescript and ng2-meta plugin. I just need to make the canonical tag change in runtime like the description changes. Is this possible?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:6
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
rafa-ascommented, Jan 10, 2019

@fulls1z3 have you some news about this? If you want I can do a PR with this feature

0reactions
d-koppenhagencommented, Jan 24, 2020

yes. The PR is already there: https://github.com/angular/angular/pull/34606

Read more comments on GitHub >

github_iconTop Results From Across the Web

URL Canonicalization and the Canonical Tag | Documentation
A canonical URL is the URL of the page that Google thinks is most representative from a set of duplicate pages on your...
Read more >
Canonical - Search Console Help - Google Support
A canonical URL is the URL of the best representative page from a group of duplicate pages, according to Google. For example, if...
Read more >
Canonicalization - Moz
A canonical tag (aka "rel canonical") is a way of telling search engines that a specific URL represents the master copy of a...
Read more >
Canonical URLs: A Beginner's Guide to Canonical Tags
A canonical URL is the URL of the principal version of a page when you have duplicate versions of that page on your...
Read more >
Canonical Tags: A Simple Guide for Beginners - Ahrefs
Canonical tags help to combat duplicate content issues. They tell search engines like Google to index and rank the right pages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found