Skip to content

Instantly share code, notes, and snippets.

@tsukiyama-a5
Created November 18, 2019 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsukiyama-a5/76264aa7df36fbb7407daa69b979c5e9 to your computer and use it in GitHub Desktop.
Save tsukiyama-a5/76264aa7df36fbb7407daa69b979c5e9 to your computer and use it in GitHub Desktop.
<!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