0
Ich versuche, Daten in Combobox zu initialisieren, und ich habe alle Möglichkeiten ausprobiert, aber nichts:ng-init funktioniert nicht Daten in Combobox inizialize (eckig)
<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>
Andere Art und Weise, dass es funktioniert, ist dies:
<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>
Aber dann ng-Show nicht funktioniert:
Irgendwelche Ideen? Vielen Dank.
nein, es funktioniert nicht wieder :(Danke trotzdem –