Schema.org recommends specifying dates and times using the time
element with the datetime
attribute - see docs e.g.
<time datetime="SOMEISODATETIME">3 April 1955</time>
However Angular 2 only allows binding to properties and it seems that datetime
is only an attribute and not a property. Trying to bind as follows ...
<time datetime="{{ myDate | date:'y-MM-dd' }}">{{ myDate | date:'YYYY MM DD' }}</time>
therefore causes errors ...
Unhandled Promise rejection: Template parse errors:
Can't bind to 'datetime' since it isn't a known property of 'time'. ("prop="headline" itemprop="name">{{ newsItem.title }}</h2>
<time class="published-date" [ERROR ->]
How should I get around this?