listenTo does not hear its respective trigger

1

I have several other listenTo that respond correctly to your trigger, but that below is not responding, I tried anyway to make it respond, but all attempts were unsuccessful.

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

this.listenTo(app.vent, 'fotoPrincipal', function(){
            console.log('teste');
        });
    
asked by anonymous 31.03.2015 / 15:23

1 answer

2

I found the error, what happens is that the listenTo is in a file that is not bound in any way to the trigger and the view where the listenTo is not loaded into memory, so listenTo will never hear the trigger. / p>     

31.03.2015 / 15:45