jenbuzz / ngx-metafrenzy Goto Github PK
View Code? Open in Web Editor NEW๐ท๏ธ Angular module for setting meta/link tags such as open graph, canonical, robots, and title
License: MIT License
๐ท๏ธ Angular module for setting meta/link tags such as open graph, canonical, robots, and title
License: MIT License
Hi Jenbuzz,
thanks for open sourcing this library ๐
I'm trying to dynamically set the canonical URL on the page. And I've found exactly what I'm looking for: setCanonical
๐
But, I sometimes want to remove the canonical URL.
A use case for that is a blog post. If someone's going to a public page I do not want any canonical URL set.
If someone's going to a blog post that should have a canonical URL, I set it.
If that person goes to somewhere else, I want to remove the canonical URL.
I guess I'm basically hoping for a removeLinkTag
method.
Do you think it makes sense?
I've tried to implement that myself but I'm not used to use the renderer outside of a component context and I'm not sure how to remove a given element here.
I am working on Angular 4 app so please suggest if I cannot use it what are the other ways to do ..
It seems unable to:
languages.forEach(language => {
rel: 'alternate',
hreflang: language,
href: '...'
});
The plugin overrides every alternate
and only the last one will be shown.
How to fix it?
Thanks in advance
If you configure an angular project's typescript options with strict
or strictNullChecks
, then you run into compilation issues with several of metafrenzy's interface definitions. For ex.,
error TS2411: Property 'charset' of type 'string | undefined' is not assignable to string index type 'string'.
This applies to all of the properties in the LinkDefinition
and OpenGraph
interfaces.
Also it seems that if you enable strictNullChecks
for this project there are a few potential bugs identified in MetafrenzyService
.
Hello and first of all: I want to thank you for providing this library to assist with meta tags management. ๐๐ฝ
More specifically what I would like to see: Intended usage description when leaving a page.
I do understand how to set some tags with the use of the provided service.
However I wonder how to deal with navigating away from the current page.
The way I understand it, I would still end up keeping the last set tags.
Is there a best practice of how to only apply the tags when I'm actually on the page where it applies?
Maybe even something that we can put in the about description or bake into the library itself?
Any ideas or recommendations of how to deal with that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.