dimanche 8 mars 2020

Getting error after migrating to Ember octane

I am using Ember 3.16.3 and i am getting this error on the following code :

Error: Assertion Failed: You must pass a function as the second argument to the on modifier

//login.hbs

 <form >
       <Input type="email" placeholder="email" @value= />
      <button type="submit">login</button>
 </form>

.

//login.js

import Route from '@ember/routing/route';

import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';

export default class LoginRoute extends Route {

   @tracked email = '';

   @action
   login(event) {
     event.preventDefault();

     // do some operations ...
  }
}



Aucun commentaire:

Enregistrer un commentaire