ngx-meta icon indicating copy to clipboard operation
ngx-meta copied to clipboard

support for multiple `og` properties with the same key

Open fulls1z3 opened this issue 8 years ago • 4 comments

I'm submitting a ... (check one with "x")

[ ] bug report => check the README and search github for a similar issue or PR before submitting
[ ] support request => check the README and search github for a similar issue or PR before submitting
[X] feature request

Current behavior @nglibs/meta does support multiple og properties with the same key.

Expected/desired behavior It should support multiple og properties with the same key.

For example:

<meta property="og:image" content="http://example.com/rock.jpg" />
<meta property="og:image:width" content="300" />
<meta property="og:image:height" content="300" />
<meta property="og:image" content="http://example.com/rock2.jpg" />
<meta property="og:image" content="http://example.com/rock3.jpg" />
<meta property="og:image:height" content="1000" />

Could have been provided by @nglibs/meta

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 2.0.X
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

fulls1z3 avatar Feb 25 '17 15:02 fulls1z3

Doesn't the knew meta service support that?

samvloeberghs avatar Apr 08 '17 15:04 samvloeberghs

When @nglibs/meta was initially released, there was no Meta service in the Angular core. As of version 4, they introduced it - and yes, the Meta service from Angular core supports that feature.

For this reason, I branched the repo into two (master and v0.2.x) while the v0.4.x consumes the Meta service from Angular core, the v0.2.x contains these features internally.

However the main thing in @nglibs/meta is, the ability to render page title and meta titles from route definitions - helping separation of different concerns a bit while improving code cleanliness.

fulls1z3 avatar Apr 08 '17 16:04 fulls1z3

Right now is there a workaround for this without using direct DOM interpolation in order to being compatible with Angular Universal?

gbertoncelli avatar May 02 '19 08:05 gbertoncelli

@HighSoftWare96 sorry for the delay, had busy times. feel free to fire a PR and i'll approve.

fulls1z3 avatar Nov 22 '19 00:11 fulls1z3