A simple VueJS filter for tag list printing
If you have this in View-Model:
let array = ['Vue', 'filter', 'tag']
but you want it shows as below in View:
#Vue, #filter, #tag
Ok. Let use this package.
Available through npm as vue-tag-list
:
npm install vue-tag-list --save
var VueTagList = require('vue-tag-list')
Vue.use(VueTagList)
- You can also directly include it with a
<script>
tag when you have Vue already included globally. It will automatically install itself, and will add a globalVueTagList
.
{{ array | tagList }}