-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2.html
43 lines (43 loc) · 904 Bytes
/
2.html
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
39
40
41
42
43
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="app">
{{name}}
<component v-bind:my-name="name">
<con v-bind:my-name="myName"></con>
</component>
</div>
<template id="component">
<div>
This is a component;
{{myName}}
<template id="con">
{{myName}}
</template>
</div>
</template>
<script src="js/vue.js"></script>
<script>
new Vue({
el:'#app',
data:{
name:"12"
},
components:{
"component":{
template:'#component',
props:['myName'],
components:{
template:'#con',
props:['myName']
}
}
}
});
</script>
</body>
</html>