<select ng-model="selected" ng-if="departmentwithid" ng-change="onChange()" class="form-control" id="dropDownDepartment">
    <option value="">{{"All" | translate}}</option>
    <option ng-repeat="dept in departments" value="{{dept.id}}" ng-selected="{{ dept.name === selected }}">{{dept.name}}</option>
</select>



<select ng-if="!departmentwithid" ng-options="o as o for o in departments" ng-model="selected" ng-change="onChange()" class="form-control" id="dropDownDepartmentNoId">
    <option value="">{{"All" | translate}}</option>
</select>
