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
+8-12Lines changed: 8 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,29 +40,25 @@ Take into account that version >= 0.3 of this addon require Ember 2.10+ and fast
40
40
41
41
## Usage
42
42
43
-
#### Template
43
+
###Head template
44
44
45
-
By installing this addon you will find a new template added to your
46
-
app:
45
+
By installing this addon, you will find a new template added to your app, called `head`:
47
46
48
47
```
49
48
app/templates/head.hbs
50
49
```
51
50
52
-
The contents of this template will be inserted into the `<head>`
53
-
element of the page.
51
+
The contents of this template will be inserted into the `<head>` element of the page.
54
52
55
53
56
-
#### Service
54
+
###Head data service
57
55
58
-
There will be a `model` in the rendering scope of this template. This
59
-
model is actually an alias for the `head-data` service. You can set
60
-
whatever data you want to be available in the template directly on
61
-
that service.
56
+
The addon provides `model` that is scoped to the `head` template. The `model` is actually an alias of the `head-data` service. You can set whatever data you want to be available to the `head` template on this service.
62
57
63
-
⚠️ Warning for Octane apps:
58
+
⚠️ Warning for Octane apps
59
+
60
+
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 the `head` template.
64
61
65
-
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`.
0 commit comments