ember-fastboot / ember-cli-head

Ember Cli Addon for Adding Content to HTML Head
MIT License
98 stars 34 forks source link

{{head-layout}} needs to be included multiple times with FastBoot #51

Open mhluska opened 6 years ago

mhluska commented 6 years ago

The readme says:

As mentioned above you need to add the {{head-layout}} component once and only once in an application wide template

But I'm finding that I need to include {{head-layout}} at whichever route level I interact with the headData service in order for it to work with FastBoot.

For example, if I have /profiles/1 which corresponds to an application route and a profile show route, both of which set data on the headData service, then I will need {{head-layout}} in application.hbs as well as profiles/show.hbs in order for the changes in the profile show route to be reflected after FastBoot render.

Hope that makes sense.

t4t5 commented 6 years ago

Can confirm that this is how it is for me as well. Using Ember CLI 2.15.1.

mhluska commented 6 years ago

@t4t5 I'm actually noticing that this is still sporadically broken for me :(

Edit: Nevermind, it's broken for another unrelated reason (array#firstObject not working in FastBoot for some reason)

knownasilya commented 5 years ago

@mhluska did you ever figure that out?

snewcomer commented 3 years ago

@mhluska The problem here is Fastboot does not include prototype extensions. This is probably an issue for quite a few apps that access firstObject in the template when they expect it to be there.