[DOC] doc: use loadJS in code example

This commit is contained in:
Géry Debongnie
2019-04-29 11:21:02 +02:00
parent fc1ea10243
commit 0a5b6aa0ec
+2 -3
View File
@@ -220,9 +220,8 @@ in some cases, for example, to load external assets (such as a JS library)
before the widget is rendered. Another use case is to load data from a server.
```javascript
willStart() {
// we assume that utils.lazyLoad return a promise
return utils.lazyLoad('my-awesome-lib.js');
async willStart() {
await owl.utils.loadJS("my-awesome-lib.js");
}
```