Routing fails mainView

At the time of changing Log out I was routed to the new view

    cerrarsesion: ()=> {
       app.dialog.create({
         title: '',
        text: '¿Desea cerrar sesion?',
        buttons: [{
          text: 'No',
        },
        {
          text: 'Si',
          onClick: () => {
            app.dialog.preloader('Cerrando Sesión');
            firebase.auth().signOut().then(function() {
              // Sign-out successful.
              localStorage.setItem("activo", null);
              app.dialog.close();
              mainView.router.navigate('/');
            }).catch(function(error) {
              // An error happened.
            });
          }
        },
      ],
    }).open();
  }

but at the time of login does not load the new view

code:
  iniciosesion: () => {
    var usuario = app.form.convertToData('#inicio');
    var correo = usuario.correo;
    var contraseña = usuario.contraseña;
    app.dialog.preloader('Iniciando Sesión', 'red');
    firebase.auth().signInWithEmailAndPassword(correo, contraseña).then(() => {
      localStorage.setItem("activo", "activo");
      app.views.main.router.navigate('/home/');
      app.dialog.close();
    }).catch(function(error) {
      // Handle Errors here.
      var errorCode = error.code;
      var errorMessage = error.message;
      // ...
    });
  },

I do not know why it does not work.