Answer the question
In order to leave comments, you need to log in
How to trim a string in Vue.js?
Let's say I want only one letter to be displayed in {{message}} - the first one for example (not "Hello Vue!" but just "H"). How to do it in a simple way:
<div id="app">
{{ message }}
</div>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!'
}
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question