Skip to content

Instantly share code, notes, and snippets.

@rmoura-92
Created August 22, 2013 16:21
Show Gist options
  • Save rmoura-92/6309462 to your computer and use it in GitHub Desktop.
Save rmoura-92/6309462 to your computer and use it in GitHub Desktop.
model increasing views
hoteis: function() {
App.CurrentView = 'hoteis';
App.Collections.Hoteis.getDestaques();
App.Collections.Hoteis.on('destaque', function(response) {
if(App.Views.Home && App.Views.Start) {
var home = App.Views.Home;
var start = App.Views.Start;
home.hide();
start.navigation.setActive(App.CurrentView);
App.Views.Form = new FormView({section:App.CurrentView});
App.Views.Items = new ItemsView({section:App.CurrentView, flat:true, model:response});
}
});
//console.log(App.Collections.Hoteis.toJSON());
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment