Reputation: 4559
I am just starting with ionic framework, trying to redo an existing bootstrap / angular application to mobile as a hybrid app.
Is there an idiomatic way to do a dropdown menu in ionic? I have searched the ionic website/forums and also googled but no luck. Like bootstrap single button dropdown. I am OK with JavaScript but HTML/CSS is not my cup of tea.
Will appreciate your help.
--EDIT
Thanks TechMa9iac. I am trying to follow that line.
I am trying to make a 2-level dropdown using angular? I have modeled my data like in the ngSelect doc.
$scope.currSel = null;
$scope.metadata = [
{ proc: "Proc-1", board: "Alloc" },
{ proc: "Proc-1", board: "Manager" },
{ proc: "Proc-1", board: "Ops" },
{ proc: "Proc-2", board: "Alloc" },
{ proc: "Proc-2", board: "Manager" },
{ proc: "Proc-3", board: "Alloc" },
{ proc: "Proc-3", board: "Manager" }
];
HTML
<span>{{item.proc}}
<select ng-model="currSel"
ng-options="item.board group by item.proc
for item in metadata">
</select>
I show the proc
value separately in html because the select text area shows only board
value (the label in select
).
Upvotes: 0
Views: 16914