I was following this example plnkr . How can I resize the model (pop up dialogou). I just wanted to know where to add height and width.
Just change style for .modal-dialog
div in modal.component.ts
:
<div class="modal-dialog" style="width: 200px">
^^^^^^^^^^^^
You can also set this value dynamically using @Input
property
@Component({
selector: 'app-modal',
template: `
...
<div class="modal-dialog" [style.width.px]="width">
`
})
export class ModalComponent {
@Input() width;
and then in your parent component:
<app-modal #modal1 [width]="200">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.