I have an http-api I can use to query about car related stuff with model objects like these coming out of the api:
class Manufacturer {
id: string;
name: string;
}
class CarType {
id: string;
model: string;
}
class Variant {
id: string;
picture: string; // an URL
}
and these methods to get the data:
function getManufacturers(): Promise<Manufacturer[]>;
function getCarTypesOfManufacturer(manufacturerId: string): Promise<CarType[]>;
function getVariantsofCarTypes(maufacturerId: string, carTypeId: string): Promise<Variant[]>;
Now I have to use Aurelia to implement dependend dropdown selections so first someone can select a Manufacturer, then gets all the CarTypes, then all the Variants for that Manufacturer and CarType. After I have this selection, I need to store the retrieved model objects in another model object that will be stored in a database later on.
I have no clue how to structure this with aurelia's binding system. Any Ideas?