forked from riot/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
38 lines (28 loc) · 786 Bytes
/
Copy pathindex.html
File metadata and controls
38 lines (28 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!doctype html>
<html>
<head>
<title>Riot Router Example: Mixins</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<my-tag></my-tag>
<my-second-tag></my-second-tag>
<!-- riot tags -->
<script type="riot/tag" src="my-tag.tag"></script>
<script type="riot/tag" src="my-second-tag.tag"></script>
<!-- scripts we need -->
<script src="https://rawgit.com/riot/riot/master/riot%2Bcompiler.min.js"></script>
<!-- mount this app -->
<script type="text/javascript">
riot.mixin('MessageMixin', {
init: function() {
console.log('Mixin!')
},
getMessage: function() {
return 'Hello world'
}
})
riot.mount('*')
</script>
</body>
</html>