ember-cli-head icon indicating copy to clipboard operation
ember-cli-head copied to clipboard

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

Open mhluska opened this issue 6 years ago • 4 comments

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.

mhluska avatar Mar 30 '18 01:03 mhluska

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

t4t5 avatar Mar 31 '18 09:03 t4t5

@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)

mhluska avatar Apr 02 '18 02:04 mhluska

@mhluska did you ever figure that out?

knownasilya avatar Jun 05 '19 20:06 knownasilya

@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.

snewcomer avatar Mar 31 '21 16:03 snewcomer