Cannot read property 'outlets' of null in Angular 4
?
in article?.id
is working fine, but the RouterLink
directive doesn't like getting a null
passed.
You could work around using something like:
<a *ngIf="article" [routerLink]="['/article',article?.id]">{{article?.title}}</a>
<a *ngIf="!article">{{article?.title}}</a>