0
저는 앵글 스트랩과 함께 특별히 모달로 작업 중이며 코딩하는 동안 this 스타일을 사용하고 있습니다. 모달의앵글 스트랩 모달 스코프
function parentController($scope, $routeParams, $location, $modal) {
var vm = this;
vm.message = '';
...
은 HTML 부분 : 내 컨트롤러의 일부입니다
<div class="modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" ng-show="title">
<button type="button" role="button" class="close" aria-label="Close" ng-click="$hide()"><span aria-hidden="true">×</span></button>
<h1 class="modal-title" ng-bind="title"></h1>
</div>
<div class="modal-body" ng-bind-html="content">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success pull-left" ng-click="$hide();parentController.f1();" aria-label="Close">yes</button>
<button type="button" class="btn btn-danger pull-left" ng-click="$hide();parentController.f2();" aria-label="Close">no</button>
</div>
</div>
</div>
</div>
그리고 컨트롤러 내 모달 정의입니다 : 내가 접근에 갈거야, 지금
var modalObject = {
scope: $scope,
templateUrl: 'path/to/modal.html',
title: 'desc',
content: '<p>enter description here</p> <textarea ng-model="parentController.message" class="form-control" rows="10"></textarea>',
show: false
};
$modal(modalObject);
parentController의 메시지 값에 추가합니다. f2 함수에 을 기록 할 때 그대로 비어 있습니다. 액세스 할 수있는 솔루션은 무엇입니까?