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: guides/release/templates/writing-helpers.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ You can also have Ember generate the file for you from the command line:
37
37
ember generate helper format-currency
38
38
```
39
39
40
-
That file should export a function wrapped with [`Ember.Helper.helper()`](https://emberjs.com/api/ember/2.15/classes/Ember.Helper/methods/helper?anchor=helper):
40
+
That file should export a function wrapped with [`helper()`](https://api.emberjs.com/ember/release/functions/@ember%2Fcomponent%2Fhelper/helper):
@@ -79,7 +79,7 @@ helper again with the new values and keep the page up-to-date.
79
79
80
80
### Helper Names
81
81
82
-
Unlike [components](../../components/defining-a-component/), which require a dash in the name to follow the Custom Element spec, helper names can be single or multi-word. If your helper's name is multi-word, it should be dasherized as the examples on this page.
82
+
Helper names can be single or multi-word. If your helper's name is multi-word, it should be dasherized as the examples on this page.
83
83
84
84
### Helper Arguments
85
85
@@ -251,10 +251,10 @@ based on the implementation of Ember's rendering engine (and this may
251
251
change from time to time) helpers make a poor home for state.
252
252
253
253
To create a class-based helper, rather than exporting a simple function, you
254
-
should export a subclass of [`Ember.Helper`][1]. Helper classes must contain a
255
-
[`compute`][2] method that behaves the same as the function passed to the
256
-
[`helper`][3] function. In order to access a service, you must first inject it
257
-
into the class-based helper. Once added, you can call the service's methods or
254
+
should export a subclass of [`Helper`][1]. Helper classes must contain a
255
+
[`compute`][2] method that behaves the same as the function passed to
256
+
[`helper`][3]. In order to access a service, you must first inject it
257
+
into the class-based helper. Once added, you can call the service's methods or
258
258
access its properties from within the `compute()` method.
259
259
260
260
As an exercise, here is the above `format-currency` helper re-factored
@@ -402,5 +402,5 @@ type="javascript">alert('pwned!');</script></b> has joined the channel.
0 commit comments