I have Angular 4.3.6 project where a template snippet produces this error.
Template block:
<a [routerLink]="['/language',language.iso639_1 || 'all']" >{{language.name}}</a>
I was also facing the same issue (Cannot read property 'outlets' of null ) but the above code that I have written, worked for me.
?
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>