Deleting a Object

Posted 3 years ago by strategicsdemexico

I have a thumbnail component like this...


module.exports = {

    template: require('./thumbnail.template.html'),

    props: [ 'photo' ],

    data: function(){
        return {
            loading: false,
        }
    },

    methods: {

        remove: function(photo){
            self = this;
            this.loading = true;
            self.$http.delete('posts/photos/'+ photo.id, function(){
                self.photo.$delete(); // How do I delete it self.
            })
        }

    }
};

How do I delete it self object.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.