<mdt-custom-cell html-content="true" column-key="role">
<!-- <span ng-class="{'red': value > 5, 'green': value <= 5}"> {{value}}</span> -->
<button ng-click="showTabDialog($event)" class="btn btn-success">Order Now </button>
</mdt-custom-cell>
这是我的材质 - 数据表的html代码。我的函数是..
$scope.showTabDialog = function(ev) {
console.log("hello");
$mdDialog.show({
controller: 'addToPrintListDialog',
templateUrl: 'views/dashboard/addToPriceListDialog.html',
parent: angular.element(document.body),
targetEvent: ev,
clickOutsideToClose:true
})
.then(function(answer) {
$scope.status = 'You said the information was "' + answer + '".';
}, function() {
$scope.status = 'You cancelled the dialog.';
});
};
这不仅适用于自定义单元格。是否有任何其他替代方案可以使其工作,如果不是这样的话。