I am new to Ember and I work on big legacy project. The issue is that URI fooUri
in the following template is bound only once and fooUri
stays the same:
<a >
<span class="appicon-table appicon"></span>
</a>
Controller code:
App.barController = Ember.ObjectController.extend({
. . .
fooUri: function() {
var fooOptions = $.extend({}, this.model.foo.options);
. . .
var querystring = encodeURIComponent($.param(fooOptions));
var uri = '#' + router.generate( ..., querystring, ...);
return uri;
}.property('fooMeasureId'),
. . .
})
E.g. I need uri will be recalculated each time I click on link because this.model.foo.options
is changed.
Thank you
Aucun commentaire:
Enregistrer un commentaire