Demo

Starting JavaScript on this Page

require(['example/helloWorldComponent'], function (page) {
  page("demo");
});

File example/helloWorldComponent.js

define(["parse", "web/Components", "example/helloWorldTexts"], function (parse) {
    return parse('example/helloWorldComponent.html');
});

File example/helloWorldComponent.html

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Example title</title>
    <script>
        function t(s, a) {
            console.log('calling t', s, a);
            return 'name';
        }

        function beforeCreate(parameters, callBack) {
            var tt = 1;
            console.log('!!!!be ready for open @{example/helloWorldTexts.'+t(tt,'a')+'} component');
            callBack();
        }

        function afterCreate(instance) {
            console.log('!!!!opened');
        }

        function send(a) {
            if (console.log) console.log("sending",a);
            alert("Send button pressed with JSON data: "+JSON.stringify(a));
        }
    </script>
</head>
<body>

<h1>Hi @{example/helloWorldTexts.name}</h1>
This is ony example
<input id="parameters.a">
<input id="parameters.b" type="password">
<button onclick="send(parameters)"></button>

</body>
</html>