I want to change the div width based on the following condition,
<div [ngStyle]="'width': selectedTab =='Home' ? '50%' : '100%'">
</div>
I am getting the tab which has been selected in "selectedTab".
I have two tabs.
1) Index
2) Home
If I select Index tab, The div width should be "100%". Incase If I select home tab, the div width should be "50%". I have written [ngStyle] condition but it is not working.
Please help me how can I handle this situation.