html - 在下拉列表中获取隐藏值
问题描述
我正在使用下拉菜单,它应该使用 ng-option 在我的对象中显示列表。我在下拉列表中获得四个项目的列表,我无法在下拉列表中看到项目
<select class="" ng-model="vendor.termMaster.termTypeMaster.id" ng-options="t.id as t.terms for t in fetchTermTypeList">
<option value="">-- Please select --</option>
以上是我所做的html代码示例。
$scope.fetchTermType= function(){
vendorsList_Service.fetchTermType().then(function(response){
$scope.fetchTermTypeList=response.data;
console.log($scope.fetchTermTypeList);
$(".loader").fadeOut("slow");
},function(response){
$(".loader").fadeOut("slow");
});
};
$scope.fetchTermType();
这是我的控制器
解决方案
推荐阅读
- python - Django Queryset 模拟对象和计数
- python - 使用 django-filter 使用嵌套序列化程序过滤视图
- r - 如何使用归因模型(马尔可夫链)在每个消费者的购买决策中获得渠道的归因?
- sql - Jupyter Notebook 代码执行
- r - 使用 dplyr 对长格式数据集中的因子/汇总因子进行描述性统计
- python - 将 API 的响应保存到 csv 文件
- server-side-rendering - 在 SvelteKit 中解释 SSR
- ios - 如何在 Xcode 上打印指南针方向?
- kubernetes - 如何创建一个卷以挂载其路径在 ConfigMap 中配置的文件
- php - 在“woocommerce_quantity_input”可插入函数中获取产品 ID