我尝试了许多方法来设置Angularjs中下拉列表的默认值,但是我无法设置默认值。<select ng-change="getModel(b.ID)" ng-model="b.ID" id="brand" ng-options="b.MakeName for b in list"><option value="1">-- Select a Make --</opti
fixture.debugElement; testDropdown = debugElement.queryAll( By.css( 'mat-selectnativeElement;// How to get the selected value from the mat-select, like below code, which is not working</em
我试图将select tag的默认值设置为saved in the model in active record。同时,如果没有指定值(例如,在创建模型时),我希望显示一个list来选择select标记的某个字段。:year_of_birth, options_for_select(valid_years), class: "" %>
但是,保存在活动记录中的值是这个select标记中的not display