in the template then access <p>{{onCategory | async}}. This keeps the logic in the class and the template smaller and free of logic
the sample <a href="readMoreLink.linkURL">{{readMoreLink.linkText}}</a> should read <a [href]="readMoreLink.linkURL">{{readMoreLink.linkText}}</a>
in the samples I suggest to protect against null values. For example the video sample would break if the video element were null or undefined. Either use *ngIf to hide the element in this case or the video?... notation
the syntax of <div class="section" *ngFor="let item of sectionOne | trackBy: trackByComponentId">should be <div class="section" *ngFor="let item of sectionOne; trackBy: trackByComponentId"> (https://angular.io/api/common/NgForOf)
the wch-contentquery sample should also use trackBy
[alt]="image.altText ? image.altText : ''"
you can use[alt]="image?.altText"
which is supposed to be equivalentutilsService
in the markup template I recommend to first define a variable with the result of the transform, like so:this.onCategory: Observable<string> = this.onRenderingContext.map(rc => utilService.getFirstCategory(rc, 'categoryElementKey'));
<p>{{onCategory | async}}
. This keeps the logic in the class and the template smaller and free of logic<a href="readMoreLink.linkURL">{{readMoreLink.linkText}}</a>
should read<a [href]="readMoreLink.linkURL">{{readMoreLink.linkText}}</a>
*ngIf
to hide the element in this case or thevideo?...
notation<div class="section" *ngFor="let item of sectionOne | trackBy: trackByComponentId">
should be<div class="section" *ngFor="let item of sectionOne; trackBy: trackByComponentId">
(https://angular.io/api/common/NgForOf)wch-contentquery
sample should also usetrackBy