1
レンダリング済みのダイアログボックスを使用しようとしていますが、何らかのエラーが考えられます。私は角材プレビューダイアログボックス問題
<div style="visibility: hidden">
<div class="md-dialog-container" id="myDialog">
<md-dialog layout-padding="" aria-label="myDialog">
<h2>Pre-Rendered Dialog</h2>
<p>
This is a pre-rendered dialog, which means that <code>$mdDialog</code> doesn't compile its
template on each opening.
<br><br>
The Dialog Element is a static element in the DOM, which is just visually hidden.<br>
Once the dialog opens, we just fetch the element from the DOM into our dialog and upon close
we restore the element back into its old DOM position.
</p>
</md-dialog>
</div>
</div>
としてHTMLを使用していた
また私のJavaScriptは、任意のヘルプ次のコード
$scope.showPrerenderedDialog = function (ev) {
$mdDialog.show({
controller: DialogController,
contentElement: '#myDialog',
parent: angular.element(document.body),
targetEvent: ev,
clickOutsideToClose: true
});
};
function DialogController($scope, $mdDialog) {
$scope.hide = function() {
$mdDialog.hide();
};
$scope.cancel = function() {
$mdDialog.cancel();
};
$scope.answer = function (answer) {
$mdDialog.hide(answer);
};
}
が含まれていますか?
コンソールですべてのエラーを取得していますか?何が起きているのか、ダイアログが開いていないのですか? – gaurav5430
同じ問題があるIm。これを理解しましたか? – Aaron
はい私はそれを考え出しました。角度バージョンの最新バージョン、つまりRCバージョンを追加する必要があります。それは後に正常に動作します –