0
Я создаю мобильное приложение, в котором при нажатии кнопки открывается диалоговое окно. Моя проблема в том, что это окно не реагирует, и я не могу изменить его CSS.Невозможно применить CSS на angularjs Dialog
Вот код:
Controller.js
.controller('jargonController', ['$scope','$mdDialog','$mdMedia',function ($scope, $mdDialog, $mdMedia){
$scope.status = ' ';
$scope.showTabwtr = function(ev) {
$mdDialog.show({
controller: DialogController,
templateUrl: 'templates/jargon/wtr.tmpl.html',
parent: angular.element(document.body),
windowClass: 'center-modal',
targetEvent: ev,
clickOutsideToClose:true
})
.then(function(answer) {
$scope.status = 'You said the information was "' + answer + '".';
}, function() {
$scope.status = 'You cancelled the dialog.';
});
}
Index.html
<div class="col col-50" >
<img src="img/jargon/Image13.png" ng-click="showTabwtr($event)" style="width: 100%; height: auto"/>
</div>
Шаблон
<div class="modall">
<img style="max-width:200px; max-height:100px"src="img/description/Image17.png"/>
</div>
CSS
.modall {
margin: auto;
position: relative;
max-width: 200px;
max-height: 80px;
background: transparent;
}
Можете ли вы предвидеть Plunkr, ..., пожалуйста? –
Проверьте эту страницу. 'Сложные диалоги могут быть рассчитаны с использованием flex =" percent ", то есть flex =" 66 "' https://material.angularjs.org/latest/api/service/$mdDialog – ksav
Спасибо. Но это только изменение высоты ... как насчет ширины? – Hana