Last active
June 8, 2016 13:14
-
-
Save wreulicke/6b2b4c30cfe662a4096a032eda7ddcc1 to your computer and use it in GitHub Desktop.
name test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Vue js</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/1.0.21/vue.js" charset="utf-8"></script> | |
<script type="text/javascript"> | |
document.addEventListener('DOMContentLoaded', init); | |
function init() { | |
window.debug=new Vue({ | |
el:hoge, | |
template:`<input v-for="item in items" v-model="item.value" :name="name">`, | |
data:function(){ | |
return { | |
name:"hoge", | |
items:[ | |
{key:"hoge",value:"test"} | |
], | |
} | |
} | |
}); | |
window.debug2=new Vue({ | |
el:fuga, | |
template:`<input v-for="value in items" v-model="value" :name="name">`, | |
data:function(){ | |
return { | |
name:"fuga", | |
items:{ | |
a:"a", | |
c:"c" | |
} | |
} | |
} | |
}); | |
debug.items[0].value="changed" | |
} | |
</script> | |
</head> | |
<body> | |
<div id="hoge"></div> | |
<div id="fuga"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment