Angularjs 在模态中使用角度trix时绑定不起作用
我用的是角三角形。 我启动了一个模式(引导),但绑定不起作用 如果我将绑定放在div中,我可以看到它被传递到modal中,但是对于角度trix组件,它不会出现 我的代码是:Angularjs 在模态中使用角度trix时绑定不起作用,angularjs,twitter-bootstrap,Angularjs,Twitter Bootstrap,我用的是角三角形。 我启动了一个模式(引导),但绑定不起作用 如果我将绑定放在div中,我可以看到它被传递到modal中,但是对于角度trix组件,它不会出现 我的代码是: $scope.editCommentDialog = function (comment) { var modalInstance = $modal.open({ templateUrl: 'editCommentDialog.html',
$scope.editCommentDialog = function (comment) {
var modalInstance = $modal.open({
templateUrl: 'editCommentDialog.html',
windowClass : 'edit-comment-modal-dialog',
controller: function ($scope, $modalInstance, editedComment) {
$scope.editedComment = editedComment;
$scope.ok = function () {
$modalInstance.close(editedComment);
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
},
resolve: {
editedComment: function () {
return { id : comment.id, text : comment.text};
}
}
});
modalInstance.result.then(function (editedComment) {
$scope.editedComment = editedComment;
$scope.updateComment();
}, function () {
$log.info('Modal dismissed at: ' + new Date());
});
};
及
编辑
好啊
取消
将ng if=“true”添加到代码中,使其看起来像:
<trix-editor ng-if="true" angular-trix ng-model="editedComment.text" class="trix-content editable-trix-editor"></trix-editor>
它解决了问题如果删除
$scope.editedComment=editedComment代码>形成您的。然后
回调?我删除了它,但仍然没有绑定。有人在这方面运气好吗?
<trix-editor angular-trix ng-model="editedComment.text" class="trix-content editable-trix-editor"></trix-editor>
<trix-editor ng-if="true" angular-trix ng-model="editedComment.text" class="trix-content editable-trix-editor"></trix-editor>