summaryrefslogtreecommitdiffstats
path: root/src/js/app.js
diff options
context:
space:
mode:
authorHumberto Alfonso Díaz <humberto.alfonso@asvito.es>2019-12-09 12:34:13 +0100
committerLorenzo Tilve <ltilve@igalia.com>2020-02-04 19:16:01 +0100
commitc1afd8404aca7a86a254a9ee8f80a87a5d8863c9 (patch)
tree9634ec223d43ea7b1dbe073d89d046800dc163f6 /src/js/app.js
parent585459eda0dcdcdff0d8bca0466a61d75459b1c4 (diff)
STRUCT Create project structure
Diffstat (limited to 'src/js/app.js')
-rw-r--r--src/js/app.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/js/app.js b/src/js/app.js
new file mode 100644
index 0000000..a0ec650
--- /dev/null
+++ b/src/js/app.js
@@ -0,0 +1,23 @@
+import { load as load_template } from './templates';
+import Mustache from 'mustache';
+
+import { lowcan } from 'agl-js-api';
+
+var template;
+var page = {
+
+};
+
+export function show() {
+ document.body.innerHTML = Mustache.render(template, page);
+}
+
+export function init() {
+ load_template('main.template.html').then(function(result) {
+ template = result;
+ Mustache.parse(template);
+ show();
+ }, function(error) {
+ console.error('ERRROR loading main template', error);
+ });
+} \ No newline at end of file