Angular Popup - Resize and Relocate
To change the size of the Popup, specify the height and width properties.
- <dx-popup
- title="Popup Title"
- [(visible)]="isPopupVisible"
- [height]="300"
- [width]="500">
- <div *dxTemplate="let data of 'content'">
- <p>Popup content</p>
- </div>
- </dx-popup>
- import { DxPopupModule } from "devextreme-angular";
- // ...
- export class AppComponent {
- isPopupVisible: boolean = true;
- }
- @NgModule({
- imports: [
- // ...
- DxPopupModule
- ],
- // ...
- })
To allow an end user to resize the Popup, assign true to the resizeEnabled property.
- <dx-popup
- title="Popup Title"
- [(visible)]="isPopupVisible"
- [resizeEnabled]="true">
- </dx-popup>
- import { DxPopupModule } from "devextreme-angular";
- // ...
- export class AppComponent {
- isPopupVisible: boolean = true;
- }
- @NgModule({
- imports: [
- // ...
- DxPopupModule
- ],
- // ...
- })
If you need to position the Popup against a specific element on your page, set the position property.
- <dx-popup
- title="Popup Title"
- [(visible)]="isPopupVisible">
- <dxo-position
- my="left"
- at="left"
- of="#targetElement">
- </dxo-position>
- </dx-popup>
- import { DxPopupModule } from "devextreme-angular";
- // ...
- export class AppComponent {
- isPopupVisible: boolean = true;
- }
- @NgModule({
- imports: [
- // ...
- DxPopupModule
- ],
- // ...
- })
This configuration of the position property reads as follows: "place my left side at the left side of the "#targetElement".
By default, an end user is allowed to change the Popup position only on desktops. To enable this feature on other devices too, set the dragEnabled property to true. Note that the user drags the Popup by its title, so the title should not be hidden.
- <dx-popup
- title="Popup Title"
- [(visible)]="isPopupVisible"
- [dragEnabled]="true">
- </dx-popup>
- import { DxPopupModule } from "devextreme-angular";
- // ...
- export class AppComponent {
- isPopupVisible: boolean = true;
- }
- @NgModule({
- imports: [
- // ...
- DxPopupModule
- ],
- // ...
- })
<html>
element and "min-height: 100%" - to the <body>
element.See Also
If you have technical questions, please create a support ticket in the DevExpress Support Center.