lundi 15 avril 2019

Ember & Typescript - defining actions

I am trying to create my first ember app with typescript and I have trouble with how actions are defined. According to several tutorials I found, I should use decorator @action like this:

import { action } from '@ember-decorators/object';

@action sayHello(){
}

But I am getting error:

Module '"../../../node_modules/@ember-decorators/object"' has no exported member 'action'.

In my package.json I have defined:

"ember-decorators": "^6.0.0",

What am I doing wrong?

Thanks




Aucun commentaire:

Enregistrer un commentaire