Here is some simple template markup:
<ng-container *ngIf="let ud = getUpdated()">
<label>Updated</label>
<span>{{ud | date:'MMM/y'}}</span>
</ng-container>
Now, while the method getUpdated() is defined on the bound component, two issues arise. Typescript complains:
[Angular] TypeError: Cannot read property 'toUpperCase' of undefined
and further issues are expressed in subsequent blocks.
Then, in lieu of building a full-blown @Pipe for this one-off getUpdated()
, what am I missing to make this work?