我在 Angular Controller 中设置 radio 模型,但它只在表格的最后一列弹出窗口中设置。
ns-popover 出现在表格列点击上。
Angular 代码
var app = angular.module('app', ['nsPopover']);
app.controller('MainController', function ($q, $timeout) {
this.foo = "foobar!";
this.fields = [
{id: 1, name: 'A'},
{id: 2, name: 'B'},
{id: 3, name: 'C'}
];
this.columns = [
{
id: 1,
entries: [
{columnType: 'a'},
{columnType: 'b'},
{columnType: 'c'}
]
},
{
id: 2,
entries: [
{columnType: 'a'},
{columnType: 'b'},
{columnType: 'c'}
]
},
{
id: 3,
entries: [
{columnType: 'a'},
{columnType: 'b'},
{columnType: 'c'}
]
}
];
$('#example').popover();
});
例子在这里 jsfiddle popup example
最佳答案
您缺少设置当前事件索引 updated fiddle link
$scope.setIndex = function(index) {
this.currentIndex = index;
};
this.currentIndex = -1;
关于javascript - 为什么没有在 ns-popover 弹出窗口中选择 radio 。仅在表格最后一列弹出窗口中选择单选,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41457791/