[Vuejs]-How to display a string value in template section in vue.js?

2👍

Just assign the orderID to the orderNumber:

    service.confirmMail().then(response =>            
        (this.orderNumber=response.data.orderID)
    )

3👍

You’re stringifying an Object of { message: string; orderId: number } which of course will result in that "string" of an Object being displayed when you use

<div class="order-id">
  {{orderNumber}}
</div>

Like Boussadjra said just assign the id to the corresponding data field

service.confirmMail().then(response =>            
        (this.orderNumber=response.data.orderId)
    )
👤Braks

Leave a comment