I've been diving deep into Angular2 lately, but I've hit a snag. Here's the template code where I'm stuck:
<div class="container" *ngFor="let group of groupList">
<div class="row">
<div class="col-xs-12">
<some-child-component [store]="group[0]" [class.hide]="evalStore(group[0])"></some-child-component>
</div>
</div>
</div>
I'm trying to call the evalStore(group[0])
method from my template. The method is in the component class as shown below:
evalStore(item:any) {
console.log('inside evalStore');
if(item === undefined){
return false;
} else {
return item.type !== 'store';
}
}
Unfortunately, I'm facing an issue where this method is not being called. There are no relevant errors showing up in the console.
Any help would be greatly appreciated...