P
P
poliglotina2016-12-21 14:18:52
css
poliglotina, 2016-12-21 14:18:52

How to change width of md2-dialog?

There is a code.

<md2-dialog #edit_user_info >  
        <span md-prefix>Имя: </span><br>
        <md-input placeholder="{{name}}" style="width: 80%"></md-input>
</md2-dialog>

You need to change the width of this md2-dialog. I added a class and id to it, and then wrote the width in css, but it doesn’t work like that. I found a way to change it only if the width is set in the root css in the md2-dialog-container class. But this way it changes the width of all dialogs, and I only need this one. Help me please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lenar Mutigullin, 2017-02-06
@NardM

In the properties you can set the width and height

let option: MdDialogConfig = new MdDialogConfig();//MdDialogConfig - это свойство 
      option.height = '500px';
      option.width = '500px';
      let dialogRef = this.dialog.open(ManagerComponent, option); // ManagerComponent - это компонента, которую
 //открываем

https://material.angular.io/components/component/dialog

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question