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: module-development/core-module-file.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ set this value in the Node helper.
73
73
be run in older versions. Keep this in mind if you get issue reports on your
74
74
module.
75
75
76
-
Example:
76
+
**Example:**
77
77
78
78
```js
79
79
requiresVersion:"2.1.0",
@@ -338,17 +338,17 @@ asynchronously. You can listen for the
338
338
when the rendering is complete and the new dom is safe to interact with. This
339
339
notification only fires if the content will really change.
340
340
341
-
As an example: the clock modules calls this method every second:
341
+
**Example:**
342
+
343
+
The clock modules calls this method every second:
342
344
343
345
```js
344
-
...
345
346
start:function() {
346
347
letself=this;
347
348
setInterval(function() {
348
349
self.updateDom(); // no speed defined, so it updates instantly.
349
350
}, 1000); //perform every 1000 milliseconds.
350
351
},
351
-
...
352
352
```
353
353
354
354
**_options_ Object** - (_Introduced in version: 2.25.0._) Optional. Allows you
@@ -367,10 +367,9 @@ module needs to be updated
367
367
| in | String | Animate name when module will be shown (after dom update), it will use an `animateIn` type name (see [Animation Guide](/modules/animate#animatein)) |
368
368
| out | String | Animate name when module will be hidden (before dom update), it will use an `animateOut` type name (see [Animation Guide](/modules/animate#animateout)) |
this.translate("RUNNING", { "timeUntilEnd": timeUntilEnd) }); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended.
637
+
this.translate("RUNNING", { "timeUntilEnd": timeUntilEnd }); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended.
640
638
```
641
639
642
640
**Example English.json file:**
@@ -665,9 +663,9 @@ did not support the word order, it is recommended to have the fallback layout.
)}); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended. (has a fallback)
}); // Will return a translated string for the identifier RUNNING, replacing `{timeUntilEnd}` with the contents of the variable `timeUntilEnd` in the order that translator intended. (has a fallback)
671
669
```
672
670
673
671
**Example Swedish.json file that does not have the variable in it:**
0 commit comments