我希望控制器中的值显示在同一列的两行中。在HTML连续显示两行
{{ngapp}}.controller("Controller", function($scope, $http, $modalInstance){
$scope.selected=[];
$scope.items=[
{
value:'Impact to Safety, regulatory compliance environment',
key:10,
color:'red'
},
{
value:'Reliability Impact',
key:9,
color:'brown'
}
]
});
代码:
<div class="well form-group" >
<table class="table" cellspacing="1">
<tr>
<th>Rank</th>
<th>Criteria: Type of loss incurred</th>
</tr>
<tr ng-repeat="item in items" onclick="selected.item= item" ng-click="sel(item)">
<td ng-style="{ 'background-color': item.color }">{{item.key}}</td>
<td> {{item.value}} </td>
</tr>
</table>
//<label>{{selected.item}}</label>
{% endverbatim %}
</div>
我想要的价值: '冲击安全' 显示在一行。而对于同一个专栏和同一个关键字,新规则中的“法规遵从性环境”也是如此。任何人都可以帮忙?谢谢。我是新来的。
对于代码的其他部分,是指这个问题,
Display value in a button by linking two modals
你能添加你的html吗? –
在问题中添加了Html。 –