0

ここに私のモーダル関数があります:

$uibModal.open({
   templateUrl: config.baseUrl + '/ClientApp/Views/Modals/userEditModal.html' + config.scriptVersion,
   size: size,
   scope: $scope,
   controller: function ($scope, $uibModalInstance) {                
     $scope.cancel = function () {
       $uibModalInstance.close();
     };
   }
}).result.catch(function (resp) {           
   if (['cancel', 'backdrop click', 'escape key press'].indexOf(resp) === -1) {
     throw resp;
   }
})

これは、他の変数と関数$uibModalがあるコントローラー内にあります。親スコープオブジェクトを使用してモーダル内で$scope行うと、うまくいきます! しかし、関数exを呼び出すと。またはexでスコープオブジェクトを使用しようとします。- そうではありません。ご覧のとおり、モーダルでスコープ プロパティに割り当てました。私は何を間違っていますか?また、関数を呼び出してみましたが、まだ機能しません。ng-repeatng-repeatdoSomething()ng-classng-class="{'css': doSomething()}"$scope$parentng-if="$parent.doSomething()"

4

1 に答える 1