UNPKG

985 BHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Hello World</title>
6</head>
7<body>
8 <div id="container">
9 <button id="btn"></button>
10 </div>
11
12 <!--<script id="tmpl" type="text/html">
13 <%=msg%>
14 </script>-->
15 <script src="../../../node_modules/jquery/dist/jquery.min.js"></script>
16 <script src="../../../dist/gmp.js"></script>
17 <script>
18 new GMP({
19 el: '#container',
20 data: {
21 msg: 'hello world'
22 },
23 events: {
24 'click #btn': 'open'
25 },
26 open: function(e) {
27 var $this = $(e.target);
28 alert(1);
29 }
30 /*template:GMP.template('tmpl'),*/
31 /*init: function(){
32 this.render();
33 },
34 render: function() {
35 $('#container').html(this.template(this.data));
36 }*/
37 });
38 </script>
39</body>
40</html>
\No newline at end of file