我想从控制器的外部路由器中设置一些属性。有没有办法做到这一点?目前当我尝试:
AS.AnalyticsIndexController = Ember.Controller.extend({
needs: ["analyticsRunsIndex"],
engagements: null,
exercises: null,
exerciseRuns: null,
selectedExercise: null,
selectedExerciseRun: null,
selectedEngagement: null,
actions: {
goToAnalyticsRuns: function () {
if (this.get('selectedExerciseRun.id')) {
this.get('controllers.analyticsRunsIndex').get('target').set('exerciseRunId', this.get('selectedExerciseRun.id'));
}
}
}
.......
“this.get('controllers.analyticsRunsIndex').get('target')”此时返回主路由器。谢谢。