I have a couple of *ngFor loops depending on iterables which might not be instantiated yet. (e.g. they are waiting for an observable)
is there any expression like this I could use in the view?
UPDATE: Here's the part thats throwing error
Component
activeLectureContent:LectureContent;
View
<div class="filter-units">
<div>Units</div>
<a (click)="setUnit(i)" class="btn btn-icon-only blue filter-unit-btn" *ngFor="#unit of activeLectureContent.content; #i = index">
<span>{{i+1}}</span>
</a>
</div>
Cannot read property 'content' of undefined in [null]
Lecture Content looks like this
export class LectureContent{
constructor(
public name:string = '',
public filter:LectureFilter[]=[],
public show:boolean = true,
public hover:boolean = false,
public content:any[]=[]
){}
}
cheers