Created
November 18, 2019 11:56
-
-
Save tsukiyama-a5/76264aa7df36fbb7407daa69b979c5e9 to your computer and use it in GitHub Desktop.
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"> | |
</head> | |
<body> | |
<div id="app"> | |
{{name}}:{{age|format}} | |
</div> | |
<script src="https://jp.vuejs.org/js/vue.js"></script> | |
<script> | |
Vue.filter('format', function(value){ | |
return '御年' + value + '歳'; | |
}); | |
var app = new Vue({ | |
el: '#app', | |
data: { | |
name: 'ogura', | |
age: 53 | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment