How can write the event to switch from portrait to landscape?And how can make this switch in browser debug?This is the view where the event landscape must be captured.Maybe in the object events?Or can you suggest me?
var HomeView = Backbone.View.extend({
template: Handlebars.compile(template),
events: {
"click .log_out":"log_out",
"click .prove":"prove"
},
initialize: function() {
console.log("inhomeview");
this.render();
},
render: function() {
//var context = JSON.parse(JSON.stringify(this.model));//eliminare
var context=this.model;
var html =this.template(context);
console.log(html);
$('#pagina').empty();
$('#pagina').append(this.$el.html(html));
return this;
},
log_out:function(){
console.log("logout");
Parse.User.logOut();
// new AppView;//ERRORE UNDEFINED NOT A FUNCTION
window.location='index.html' ;//METTERE UNA NEW APPVIEW MA DA ERRORE!!!
},
prove:function(){
var lista=new Usercollection();
lista.fetch();
console.log(lista.length);
}
});
return HomeView;
});