jeudi 1 novembre 2018

Why append method not working with empty array in VueJS

I have a component with empty data array

data: () => ({
    selectedResource : [],
}),

but when i try to add some item to this array i got an error

    selectResource(resource){
        console.log(this.selectedResource);
        this.selectedResource.append(resource)
    }

this.selectedResource.append is not a function



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2EVYqwL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire