How to change the position of a fab button dinamically?


#1

Hi,
How I can bind “right” or “left” to MyFabPosition in this code ? :

<ion-fab top MyFabPosition>
        <button ion-fab><ion-icon name="arrow-dropdown"></ion-icon></button>
        <ion-fab-list side="bottom">
            <button ion-fab><ion-icon name="locate"></ion-icon></button>
            <button ion-fab><ion-icon name="refresh"></ion-icon></button>
        </ion-fab-list>
    </ion-fab>

Thanks for your help


#2

try ion-fab top left MyFabPosition
or ion-fab top right MyFabPosition


#3

Thanks for your answer but, I know that I have to use right or left, what I don’t know is how to put dinamically right or left in this template.
For exemple I have this in my ts file => MyFabPosition=‘right’ and I want to have in my template to put my fab menu to the right.


#4

No one as an idea how I can do ?
I really need help on this, thanks a lot in advance.


#5

I think you need to do it using css