vendredi 2 octobre 2015

WebStorm/PHPStorm ES2015 autocomplete on this.get('obect')

I'm using PHPStorm to develop an Ember application and I am looking for a way to enable code autocomplete on the .get() function.

This causes autocomplete, but it doesn't work quite right with Ember as Ember likes to use get('appCache') format:

import Ember from 'ember';
export default Ember.Route.extend({
    appCache: Ember.inject.service(),
    beforeModel(transition){
        this.appCache.preLoadData();
    }
});

This doesn't cause autocomplete, but does work in Ember.

import Ember from 'ember';
export default Ember.Route.extend({
    appCache: Ember.inject.service(),
    beforeModel(transition){
        this.get('appCache').preLoadData();
    }
});

Any ideas on how I can configure PHPStorm to make it autocomplete on the second example?

Thanks!




Aucun commentaire:

Enregistrer un commentaire