Store 'form' in a variable - Meteor


I'm trying to store an entry by telcado or input in a variable, but when I try to print it, it returns empty.

This is a simple login.

I have a file called login.js, in which the one I set the from in the following way:{
'submit form': function(event) {
    Meteor.loginWithPassword(**aux =**,, function(err){

Regarding the html file, the code that it presents is the following:

div class="modal-body">
      <form class="form col-md-12 center-block">
        <div class="form-group">
         <input name="usuario" type="text" id="inputEmail" class="form-control input-lg" placeholder="Usuario" required autofocus>
        <div class="form-group">
         <input name="clave" type="password" id="inputPassword" class="form-control input-lg" placeholder="Contraseña" required>
        <div class="form-group">
         <button class="btn btn-lg btn-primary btn-block" type="submit">Ingresar</button>
         <!--Es posible que sea necesario,destinar un link, para ayudar al usuario en el caso de que no pueda acceder-->
         <span><a id="ayuda" href="#">¿Necesitas ayuda?</a></span>

When trying to print the value of said variable from another template ( {{aux}} ), through the html file, it does not print any value. The value I try to store and print in another template is the name of the user,

I have tried this process importing and exporting the variable in several ways, but I never get to print the value. The truth, I'm not sure how to do it (I'm new to web programming, and Meteor)

asked by Mario López Batres 19.01.2017 в 15:43

1 answer

 currentUser: function() {
  return Meteor.userId();
answered by 19.01.2017 / 17:31