You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-35Lines changed: 26 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Install by running
23
23
ember install ember-cli-head
24
24
```
25
25
26
-
And add `{{head-layout}}` to the top of your application template.
26
+
And add `<HeadLayout />` to the top of your application template.
27
27
28
28
#### Version
29
29
Take into account that version >= 0.3 of this addon require Ember 2.10+ and fastboot >=1.0.rc1
@@ -51,30 +51,33 @@ model is actually an alias for the `head-data` service. You can set
51
51
whatever data you want to be available in the template directly on
52
52
that service.
53
53
54
+
⚠️ Warning for Octane apps:
55
+
56
+
Because `model` refers to the `head-data` service (and not what a route's `model` hook returns), it is important to use `this.model` (not `@model`) in `app/templates/head.hbs`.
<divid="ember383"class="ember-view"><h2id="title">Welcome to Ember</h2>
106
-
107
-
</div>
96
+
...
108
97
</body>
109
98
</html>
110
99
```
@@ -117,21 +106,23 @@ If you do not wish to have the head content "live" while running in browser you
117
106
118
107
```javascript
119
108
module.exports=function(environment) {
120
-
varENV= {
109
+
letENV= {
121
110
'ember-cli-head': {
122
-
suppressBrowserRender:true
111
+
suppressBrowserRender:true
123
112
}
124
113
};
125
-
}
114
+
115
+
returnENV;
116
+
};
126
117
```
127
118
128
119
### Upgrade to 0.4.x
129
120
130
-
As mentioned above you need to add the `{{head-layout}}` component once and only once in an application wide template. This template is usually `app/templates/application.hbs`, but could be different in your case. Previously, in ember-cli-head 0.3.x and below the component was appended to the document inside an instance initializer. This prevented the need for the `{{head-layout}}` component as it was automatically injected and used inside that initializer. Unfortunately, this approach needed to change so that we could render the component with the rest of the application rendering.
121
+
As mentioned above you need to add the `<HeadLayout />` component once and only once in an application wide template. This template is usually `app/templates/application.hbs`, but could be different in your case. Previously, in ember-cli-head 0.3.x and below the component was appended to the document inside an instance initializer. This prevented the need for the `<HeadLayout />` component as it was automatically injected and used inside that initializer. Unfortunately, this approach needed to change so that we could render the component with the rest of the application rendering.
131
122
132
123
If you care to read more about the details of render please see the PR that introduced these changes https://github.com/ronco/ember-cli-head/pull/37
133
124
134
-
But for now, if you are upgrading to 0.4.x, you simply need to add `{{head-layout}}` component to your application wide template.
125
+
But for now, if you are upgrading to 0.4.x, you simply need to add `<HeadLayout />` component to your application wide template.
135
126
136
127
If you make use of this mode the content of `<head>` will be the static FastBoot rendered content through the life of your App.
0 commit comments