I am interested in creating a dropdown menu that can be filled with values from my model.
App.CoursesRoute = Ember.Route.extend({
model: function() {
return Ember.RSVP.hash({
mathcourses: this.store.find('mathcourse'),
quickmathunits: this.store.find('quickmathunit'),
cscourses: this.store.find('cscourse'),
quickcsunits: this.store.find('quickcsunit'),
})
}
});
App.Mathcourse = DS.Model.extend({
title: DS.attr('string'),
});
App.Mathcourse.FIXTURES = [
{id: 1, title:'Algebra', math: true},
{id: 2, title:'Geometry', math: false},
{id: 3, title:'Algebra 2'},
{id: 4, title:'Statistics'},
{id: 5, title:'Pre-Calculus'},
]
This code snippet is part of the index.html file.
{{view Ember.Select
content= mathcourses
optionValuePath="content.id"
optionLabelPath="content.title"}}
This piece of code belongs to app.js file.
Can anyone guide me on what code needs to be added to make the dropdown selection work as intended? The list displays properly but I am unsure how to use the IDs for link-to functionality when a value is chosen. I want it to act like a menu to switch between different subpages.