Homemade NavBar. environment contains lists with the dropdown elements defined like this:
{
title: 'Overview', isDropped: false, Links: [
{linkTitle: 'What is Hunter', linkRoute: '/whatishunter'},
{linkTitle: 'What is a Hard Problem', linkRoute: '/hardproblem'},
{linkTitle: 'Real World Applications', linkRoute: '/realapps'},
{linkTitle: 'Using Hunter', linkRoute: '/usingHunter'}
]
},
The navbar html loops (ngFor) for each dropdown in that section of the navbar; added leftdropdown is dropped to show what's happening:
<div class="positionLeft" [ngStyle]="{'z-index': '2', 'height': '50px'}">
<div *ngFor="let leftdropdown of barContents.leftMenus">
<app-navdropdown [title]="[leftdropdown.title]" [isDropped]="[leftdropdown.isDropped]"
[links]="[leftdropdown.links]"></app-navdropdown>
added leftdropdown isdropped = {{leftdropdown.isDropped}}
</div>
The "leftdropdown" elements are from the environment list above. The component.ts is:
And it's trivial HTML is (with extra diagnostic text):
So when the application runs we see the output html as:
And just to be sure, I can manually change isDropped to true and the "if block" is displayed. The obvious error is that *ngIf is inverting the isDropped expression ????
Any clues as to what must be a misunderstanding or simple syntax error?
Thanks for your time and advice.
Chuck (Yogi)