0
난 그냥 ember.js (v1.7.0)로 시작, 그리고 난 다음 라우팅 구성이 있습니다Ember.js : 실패 중첩 된 경로에서 컨트롤러 의존성
this.resource('customer', { path: '/Customer/:id' }, function() {
this.route('employees', { path: '/Employees' });
}
나는 제어기 직원에 정의하려고를 이와 같은 고객 컨트롤러에 대한 의존성은 다음과 같습니다.
App.CustomerEmployeesController = Ember.ArrayController.extend({
needs: "customer",
customer: Ember.computed.alias('controllers.customer')
}
그러나 고객은 항상 undefined
입니다. this.controllerFor('customer')
을 사용하면 예상대로 작동합니다. 여기에 설명 할 jsbin이 있습니다 : http://jsbin.com/jifiqe/1/edit
첫 번째 문제가 해결되었습니다. 감사! – ice