I'm trying to initialize data in combobox, and I have tried every possible ways, but nothing:
<select ng-init= "account.username = githubaccounts[0].username" data-ng-model="account" data-ng-options="account.username for account in githubaccounts"
class="btn btn-default" data-container="body">
</select>
<div class="form-group" ng-show="account.username == 'Other'">
<label for="groupNameTxt">Group Name:</label>
<input type="text" class="form-control" name="groupNameTxt" id="groupNameTxt" placeholder="Enter Group Name..." ng-model="group.groupName">
</div>
Other way that it works is this:
<select class="btn btn-default" data-container="body"
ng-init="githubaccounts[0].username" ng-model="account">
<option ng-repeat="account in githubaccounts" value="">
{{account.username}}
</option>
</select>
But, then, ng-show doesn't work:
Any ideas? Thank you very much.