Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to chain dropdowns with AngularJS?
    primarykey
    data
    text
    <p>Sorry for the bad title, I don't really know how to formulate it better, would be nice if someone would edit it to make it better fit my idea.</p> <p>What I'd like to do is click on a company -> that would load all of the given companies departments and when I would click on a department, that would show all of the positions in it. </p> <p><strong>Template:</strong></p> <pre><code> &lt;label&gt; &lt;span style="float: left; width: 100px;"&gt;Company&lt;/span&gt; &lt;select multiple style="width: 670px; float: left; height: 150px;"&gt; &lt;option&gt;All&lt;/option&gt; &lt;option disabled="disabled"&gt;-----------------------&lt;/option&gt; &lt;option ng-repeat="employee in employees | unique: 'company'" ng-bind="employee.company.name"&gt;&lt;/option&gt; &lt;/select&gt; &lt;/label&gt; &lt;label&gt; &lt;span style="float: left; width: 100px;"&gt;Department&lt;/span&gt; &lt;select multiple style="width: 670px; float: left; height: 150px;"&gt; &lt;option&gt;All&lt;/option&gt; &lt;option disabled="disabled"&gt;-----------------------&lt;/option&gt; &lt;option ng-repeat="employee in employees | unique: 'department'" ng-bind="employee.department.name"&gt;&lt;/option&gt; &lt;/select&gt; &lt;/label&gt; &lt;label&gt; &lt;span style="float: left; width: 100px;"&gt;Position&lt;/span&gt; &lt;select multiple style="width: 670px; float: left; height: 150px;"&gt; &lt;option&gt;All&lt;/option&gt; &lt;option disabled="disabled"&gt;-----------------------&lt;/option&gt; &lt;option ng-repeat="employee in employees | unique: 'position'" ng-bind="employee.position.name"&gt;&lt;/option&gt; &lt;/select&gt; &lt;/label&gt; </code></pre> <p><strong>Controller:</strong></p> <pre><code>$scope.employees = ContactsApi.Employee.query().$promise.then(function(response) { return response; }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload