how can I access a variable in Ember controller? I've tried those methods, but it doesn't work:
import ObjectController from '@ember/controller';
export default ObjectController.extend({
currentPhase: 1,
init: function () {
var selfReference = this;
this.set("currentPhase",1);
},
strings: {
title: "Title",
phase1: "Fase " + selfReference.get("currentPhase"),
phase2: "Fase " + currentPhase
}
});
Aucun commentaire:
Enregistrer un commentaire