首先在controller中配置$mdDialog
/触发弹窗事件/
var DialogController = function($scope, $mdDialog) {
$scope.hide = function() {
$mdDialog.hide();
};
$scope.cancel = function() {
$mdDialog.cancel();
};
$scope.answer = function(answer) {
$mdDialog.hide(answer);
};
};
/*触发弹窗事件*/
$scope.showMean = function($event,row) {
var dScope = $scope.$new(true);
dScope.row = row;
$mdDialog.show({
scope:dScope,
controller:DialogController,
//1.直接使用模板内容
//template: '<md-dialog aria-label="Mango (Fruit)"><md-dialog-content><h2>Using .md-dialog-content class that sets the padding as the spec</h2></md-dialog-content></md-dialog>',
//2.使用模板文件
templateUrl: 'assets/javascripts/physicalExamination/mean.html',
parent: angular.element(document.body),
targetEvent: row,
clickO