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

Support Rendering Server Side?

Open maxiar opened this issue 9 years ago • 11 comments

Is this component support Rendering Server Side by Angular Universal?

maxiar avatar Sep 01 '16 03:09 maxiar

It doesn't, though that would be supper cool! The issue with it using universal is that the backend doesn't have the ability to modify the head yet. The Universal guys are working on that though, in the mean time you can use the Renderer from @angular/core to make changes to the DOM before serving the file.

scott-wyatt avatar Sep 12 '16 21:09 scott-wyatt

@scott-wyatt would you mind sharing and example of how to use the Renderer to modify meta tags?

amauryprieto avatar Oct 25 '16 22:10 amauryprieto

Like all things angular, that part of angular has changed again lol. The universal guys are working on a Meta Service to allow for this server side.

scott-wyatt avatar Oct 26 '16 14:10 scott-wyatt

It looks like something is underway for this: https://github.com/angular/angular/pull/12322

mklemme avatar Oct 31 '16 23:10 mklemme

Looks like we will have angular metatags built-in, but no sooner than 2.3.0 beta release. Nevertheless, I wonder if this wonderful module is going to get server side rendering support. @vinaygopinath, any thoughts on this?

PickRelated avatar Nov 14 '16 18:11 PickRelated

I'd like to make ng2-meta compatible with server-side rendering. I've been following the activity on the angular/universal thread, and it looks like using DomAdapter instead of plain old document while creating/updating meta elements would be the key change.

Does anyone want to take a crack at it?

vinaygopinath avatar Nov 16 '16 00:11 vinaygopinath

@vinaygopinath yes i guess lets use DomAdapter.

kodeine avatar Nov 20 '16 18:11 kodeine

@vinaygopinath any updates on this?

kodeine avatar Nov 25 '16 22:11 kodeine

hey guys, any update?

dukang avatar Dec 18 '16 12:12 dukang

Any updates? I'd really like to see this working!

nicky-lenaers avatar Feb 11 '17 23:02 nicky-lenaers

Angular Universal Starter has angular2-meta service that helps modify head tag in server side. This service will be added to @angular/platform-browser in Angular 4.0.

yaroslavOshyyko avatar Feb 19 '17 16:02 yaroslavOshyyko