Meteor get event in iron:router controller
<p>Im working on a website in meteor. I just started working with controllers but cant figure out how to get a button click for instance.</p>

<p>I have the following temnplate:</p>

<pre><code>&lt;template name="login"&gt;
    &lt;form&gt;
        &lt;input type="email" name="loginEmail"&gt;
        &lt;input type="password" name="loginPassword"&gt;
        &lt;input type="submit" class="login" value="Login"&gt;
    &lt;/form&gt;
&lt;/template&gt;
</code></pre>

<p>And my controller:</p>

<pre><code>LoginController = RouteController.extend({
  template: 'login',

  'click .login': function(e, t) {
      alert('submit button is clicked');
    }
  });
</code></pre>

<p>Now when I click the submit button the page reloads and passes all data to the url. this is not at all what I want. I want the alert to pop up.</p>

<p>I dont quite know where to start and I think it has something to do with the fact that I dont understand the way I should use controllers. Before using controllers this worked:</p>

<pre><code>Template.login.events({
    'submit form': function(event){
        event.preventDefault();
        var emailVar = event.target.loginEmail.value;
        var passwordVar = event.target.loginPassword.value;
        Meteor.loginWithPassword(emailVar, passwordVar);
        console.log('loggin in');
    }
});
</code></pre>

<p>So how could I achieve the same thing inside my controller? Or should I make a method for it?</p>

<p>NOTE: I use iron:router to call the controller:</p>

<pre><code>Router.route('/login', {
  name: 'login',
  controller: 'LoginController'
});
</code></pre>