Reputation: 153
I am trying this but no luck, using angular 8 and Primeng 9.0.0-rc.4. Thank you so much.
<p-dialog position="right" header="Change Password" (visible)]="display">
Content
</p-dialog>
https://www.primefaces.org/primeng/#/dialog
Upvotes: 1
Views: 9701
Reputation: 785
You can use this css class
p-dialog.top-dialog .ui-dialog-wrapper .ui-dialog{ top: 5vh;}
And give this class to it:
<p-dialog class="top-dialog" ...>
Upvotes: 0
Reputation: 111
position only works from version 9 of prime, for the version below use positionDirection, example: [postionTop] = "15"
Upvotes: 1
Reputation: 1556
The 9.0 release just came out, and it seems to be working. the RC-4 was giving me the same error as Scott L before I updated, it is working now.
However, I've noticed that the positionLeft and positionTop don't seem to work. Also, if you specify position, and draggable properties and then try to drag it, it disappears or moves halfway off the window, and you can't drag it back. I would expect it would start at the position specified, until you drag it, but I haven't been able to make it work.
Upvotes: 2
Reputation: 1
You might want to check what primeNG version you are using. I think primeNG v8 has the position property but not v7 and below.
v8: https://www.primefaces.org/primeng/#/dialog
v7: https://www.primefaces.org/primeng-7.1.3/#/dialog
Upvotes: 0
Reputation: 81
I'm having the same issue. position="left" doesn't work. If I do [position] I get "ERROR in Can't bind to 'position' since it isn't a known property of 'p-dialog'". Even looking in the NPM package I can't find "position", just positionOverlay, positionLeft and positionTop.
FYI - If you try to position the dialog yourself, positionLeft and positionTop don't work unless you have both positionLeft AND positionTop. (https://forum.primefaces.org/viewtopic.php?t=51000),
Upvotes: 1