SideDrawer's MyDrawerItem always shown although visibility collapsed set


The SideDrawer’s MyDrawerItem is always shown although visibility collapse set:

  <MyDrawerItem [visibility]="1==1? 'collapse' :'collapse'" title="search" route="/search" icon="&#xf144;" [isSelected]="isPageSelected('Search')"></MyDrawerItem>

Any way to solve it?


I have to guess a bit because of the lack of context: are you using this template?

Then take a look at, which is the view implementation of MyDrawerItem and there’s no visibility attribute.

So either add that attribute in the component, or use *ngIf instead of visibility.


I added visibility my-drawer-item html to:

[visibility]=“title? ‘visible’ :‘collapse’”
columns=“auto, *” class=“sidedrawer-list-item” [class.selected]=“isSelected” (tap)=“onNavItemTap(route)”>
<Label col=“0” [text]=“icon” class=“fa”>
<Label col=“1” [text]=“title” class=“p-r-10”>

so now on my-drawer html I can set tittle this way:
<MyDrawerItem [title]=“config.venue? ‘Info’: null”