Issue
I am trying to use Angular readymade pipe (i.e. date, uppercase) in my Ionic project within a component, but it gives an error.
I have a component folder inside the src/app folder. The components are each in their own folder with scss, html, and ts files.
<div class="day">
{{ day | date }}
</div>
<div class="month">
{{ month | uppercase }}
</div>
Do I have to import the DateModule somewhere?
Solution
There isn't any module named as DateModule.
The date pipe is part of the CommonModule (see @angular/common package).
The CommonModule exports are re-exported by BrowserModule, which is included automatically in the root AppModule (Also in Ionic projects).
Answered By - Omri L
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.