ember-fastboot / ember-fastboot/ember-cli-fastboot

Shoebox data from index.html not available

Open
#638 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
850
Forks
161
Avg merge
17h 45m
Merged PRs (30d)
19

Description

If I add some shoebox data to my `index.html` like this:

```html




FastbootShoeboxExample

{{content-for "head"}}


{{content-for "head-footer"}}


{{content-for "body"}}


{{content-for "body-footer"}}

{"foo":"bar"}

```

I would expect to be able to retrieve it in my application route like this:

```js
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';

export default Route.extend({
fastboot: service(),

model() {
return this.get("fastboot.shoebox").retrieve("assets");
}
});
```

However, no data is returned.

I have made a simple example reproduction of this issue here:
https://github.com/chrism/fastboot-shoebox-example

If you run in a browser with javascript disabled then the `shoebox-assets` script is visible in the elements, but no data retrieved.

screen shot 2018-11-04 at 16 52 08

I saw that there is a PR which may be related to this issue, https://github.com/ember-fastboot/ember-cli-fastboot/pull/636

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.