mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[DOC] move quick_start into learning/ sub folder
This commit is contained in:
@@ -2,8 +2,17 @@
|
|||||||
|
|
||||||
## Static Server
|
## Static Server
|
||||||
|
|
||||||
Let us assume that we have a static server running somewhere. We could then
|
Let us assume that we have a static server running somewhere. Let us start by
|
||||||
simply add an html page with a few extra files.
|
adding an html page with a few extra files:
|
||||||
|
|
||||||
|
```
|
||||||
|
my-app/
|
||||||
|
index.html
|
||||||
|
app.css
|
||||||
|
app.js
|
||||||
|
owl-X.Y.Z.js
|
||||||
|
templates.xml
|
||||||
|
```
|
||||||
|
|
||||||
### HTML and CSS
|
### HTML and CSS
|
||||||
|
|
||||||
@@ -88,10 +97,9 @@ class ClickCounter extends owl.Component {
|
|||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
async function start() {
|
async function start() {
|
||||||
const templates = await owl.utils.loadFile("templates.xml");
|
const templates = await owl.utils.loadFile("templates.xml");
|
||||||
const env = {
|
const qweb = new owl.QWeb({ templates });
|
||||||
qweb: new owl.QWeb({ templates })
|
owl.config.env.qweb = qweb;
|
||||||
};
|
const counter = new ClickCounter();
|
||||||
const counter = new ClickCounter(env);
|
|
||||||
const target = document.getElementById("main");
|
const target = document.getElementById("main");
|
||||||
await counter.mount(target);
|
await counter.mount(target);
|
||||||
}
|
}
|
||||||
+1
-1
@@ -65,7 +65,7 @@ Note that for convenience, the `useState` hook is also exported at the root of t
|
|||||||
|
|
||||||
## Learning Resources
|
## Learning Resources
|
||||||
|
|
||||||
- [Quick Start](quick_start.md)
|
- [Quick Start: create an (almost) empty Owl application](learning/quick_start.md)
|
||||||
|
|
||||||
## Miscellaneous
|
## Miscellaneous
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user