listenTo does not listen to their respective Rigger

Asked

Viewed 48 times

1

I have several other listenTo respond correctly to your Rigger, however this below is not responding, I have tried in every way to make her answer, but all attempts were unsuccessful.

addFotoPrincipal: function(){
            app.vent.trigger('fotoPrincipal');
        },

this.listenTo(app.vent, 'fotoPrincipal', function(){
            console.log('teste');
        });

1 answer

2

I found the error, what happens is that the listenTo is in a file that is not connected in any way to Trigger and the view where the listenTo is not loaded in memory, so the listenTo will never listen to Trigger.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.