angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.12k stars 1.24k forks source link

Suggestion: description meta tag should be accessible to angular #537

Closed simonh1000 closed 8 years ago

simonh1000 commented 10 years ago

By default the generator places the ng-app statement on the body tag, which means that it is not possible to update <meta description-...> dynamically. With Google now able to process some javascript, I think this could be useful to be able to control

kingcody commented 10 years ago

Since there is no javascript being loaded in the head, I wouldn't foresee any performance changes from moving ng-app to the html tag.

kingcody commented 10 years ago

Sorry, my point was to say that I see no reason why not.

JaKXz commented 10 years ago

This is a good question, are there any major oppositions to moving ng-app to the html tag?

kingcody commented 10 years ago

I for one, am for it :)

simonh1000 commented 10 years ago

I switched it in my code with, unsurprisingly, no difficulties. Still to see whether having control over title and meta tag descriptions helps with SEO in any way

On 25 September 2014 08:29, Cody Mize notifications@github.com wrote:

I for one, am for it :)

— Reply to this email directly or view it on GitHub https://github.com/DaftMonk/generator-angular-fullstack/issues/537#issuecomment-56778776 .

kingcody commented 10 years ago

@simonh1000, @JaKXz I've used ng-app on the html element on several projects with out any issue, and being that it is listed as a viable location in the angular docs I don't think that we would see any problems.

wikett commented 9 years ago

@kingcody I´ve used your approach and it works perfectly. Google indexed all my pages with its title and meta description properly.

The problem that I have now is when I try to share one page on Facebook because Facebook doesn´t run javascript before to post it. The only solution is using something like https://prerender.io/ ???

my website is www.subexpuesta.com (it´s only in spanish but I want to translate it)