odoo / owl

OWL: A web framework for structured, dynamic and maintainable applications
https://odoo.github.io/owl/
Other
1.13k stars 341 forks source link

playground_ seek help #1224

Open jackadam1981 opened 2 years ago

jackadam1981 commented 2 years ago

I am learning owl framework and components.

https://odoo.github.io/owl/playground/

But I don't know where xmltemplates is written.

image

just: js->app.js cs->app.css xml->templates.xml

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>OWL Todo App</title>
    <link rel="stylesheet" href="app.css" />
  </head>
  <body>
    <script src="owl.min.js"></script>
    <script src="app.js"></script>
  </body>
</html>

how to loadfile for templates

kebeclibre commented 1 year ago

@jackadam1981 Hi, sorry for the delay. The templates of the playground are indeed in templates.xml. They are load via the function start situated at the end of app.js, then the result of that basic GET request is pushed into the instance of the owl.App of the playground

The templates and code for the examples/exercises are situated in samples.js, which should be included in html's head of the main page, because app.js imports that file