2017-03-28 7 views
-1

が定義されていない以下bottomsheet

div(flex="15" data-ng-click="showGridBottomSheet(testExecution)" class="link-style") 

を使用するときに私たちは、エラーを取得するには、私はあなたがこのようなあなたの関数パラメータに$eventを追加する必要があると思うと呼ばれる関数

$scope.showGridBottomSheet = function(obj) { 

    testexecutionServices.testexeustionObj = obj; 
    $mdBottomSheet.show({ 
     scope: $scope, 
     targetEvent: $event, 
     preserveScope: true, 
     templateUrl: 'testexecutions/testExecutionResult', 
     controller: 'testexecutionCtrl' 
    }).then(function(clickedItem) { 

    }, function() {}); 
}; 

答えて

0

次のとおりです。

$scope.showGridBottomSheet = function(obj, $event) { 

testexecutionServices.testexeustionObj = obj; 
$mdBottomSheet.show({ 
    scope: $scope, 
    targetEvent: $event, 
    preserveScope: true, 
    templateUrl: 'testexecutions/testExecutionResult', 
    controller: 'testexecutionCtrl' 
}).then(function(clickedItem) { 

}, function() {}); 
}; 

あなたのHTMLには、$eventをfuに渡しますnctionコール:

div(flex="15" data-ng-click="showGridBottomSheet(testExecution,$event)" class="link-style") 

あなたはそれがnullに設定し使用していない場合。

関連する問題