import { DaffRestoreableCanonicalService } from '@daffodil/seo'
Manages the page's canonical URL.
@Injectable()
class DaffRestoreableCanonicalService implements DaffSeoRestoreableServiceInterface<string, string> {
get upsertCache(): string
get restoreCache(): string
get canonicalLink(): HTMLLinkElement
upsert(url: string): void
clear(): void
restore(): void
emptyRestoreCache(): void
}
string
Default | – |
---|---|
Description | Stores the upserted SEO data since the last clear. This represents the SEO data managed by the service. |
string
Default | – |
---|---|
Description | Stores the SEO data present on the current document when it is removed by |
HTMLLinkElement
Default | – |
---|---|
Description | The canonical link element. |
void
Adds the SEO info to the page. Adds the info to the upsert cache.
@param info
Parameter | url: string |
---|---|
Description |
void
Removes all of the added SEO info from the page. Only removes what was previously added by this service, that is, what is in the upsert cache.
The SEO data that was removed is then moved to the restore cache.
void
Restores the previously cleared SEO info to the page.
void
Empties the restore cache. Does not affect upsert cache.