Skip to content

Instantly share code, notes, and snippets.

@tsukiyama-a5
Created November 18, 2019 12:53
Show Gist options
  • Save tsukiyama-a5/dabaecdb244aa1e84ff8056235fce2c4 to your computer and use it in GitHub Desktop.
Save tsukiyama-a5/dabaecdb244aa1e84ff8056235fce2c4 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>
var app = new Vue({
el: '#app',
data: {
name: 'ogura',
age: 53
},
filters: {
format: function(value) {
return '御年' + value + '歳';
}
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment