我試圖在我的Nativescript
+ Angular 2
移動應用程序上添加DatePipe
。它正在Android模擬器上工作,但在ios模擬器上出現錯誤。Angular2 DatePipe未在ios中工作
Error: file:///app/tns_modules/@angular/core/bundles/core.umd.js:9427:77: JS ERROR Error: Error in pages/home/home.component.html:86:29 caused by: Invalid argument '2016-11-15T10:51:07+0300' for pipe 'DatePipe'
我的代碼:<Label col="1" [text]="item.datetime | date:'yMMMd'"></Label>
請幫我解決這個問題。
感謝@ ranakrunal9,我已經加入Momentjs,現在它的工作的罰款。 – ramya0072