New to Ember.js and grappling with the binding of selection in Select views to the controller. The template I am working with is as follows:
{{view Ember.Select
contentBinding="content"
selectionBinding="selectedCompany"
optionLabelPath="content.name"}}
{{view Ember.Select
contentBinding="selectedCompany.employees"
selectionBinding="selectedEmployee"
optionLabelPath="content.name"}}
Employee: {{selectedEmployee.name}}
Age: {{selectedEmployee.age}}
Noticing that the second select updates upon a change in selectedCompany
. However, unable to access the values of name
or age
in selectedEmployee
until manually altering the value in the second select.
Seeking insight on how to ensure selectedEmployee
is set when there's a change in the first select, allowing for immediate use of its value.
For those who prefer visuals, view my functional code here.