Missing locale data for the locale quot;ruquot; Angular 5(缺少区域设置“ru的区域设置数据;角 5)
问题描述
我将 Angular 更新到版本 5 并收到此错误
在我看来,这一行中的管道错误
<h5>{{ event.date |日期:"yyyy.MM.dd"}}</h5>
.
有人知道如何解决这个问题吗?
似乎你没有更新你的管道,因为破坏了 angular 5 的变化请参阅:
<块引用>您还需要像这样在 app.module 中提供您的语言:
I updated Angular to version 5 and get this error
It seems to me the error with pipe in this line
<h5>{{ event.date | date:"yyyy.MM.dd"}}</h5>
.
Anybody knows how to fix this?
It seems you don't update your pipe since breacking change of angular 5 see: https://github.com/angular/angular/blob/master/CHANGELOG.md
- by default Angular now only contains locale data for the language en-US, if you set the value of LOCALE_ID to another locale, you will have to import new locale data for this language because we don't use the intl API anymore.
- all i18n pipes now have an additional last parameter locale which allows you to use a specific locale instead of the one defined in the token LOCALE_ID (whose default value is en-US).
the predefined formats (short, shortTime, shortDate, medium, ...) now use the patterns given by CLDR (like it was in AngularJS) instead of the ones from the intl API. You might notice some changes, e.g. shortDate will be 8/15/17 instead of 8/15/2017 for en-US.
the narrow version of eras is now GGGGG instead of G, the format G is now similar to GG and GGG.
- the narrow version of months is now MMMMM instead of L, the format L is now the short standalone version of months.
- the narrow version of the week day is now EEEEE instead of E, the format E is now similar to EE and EEE.
- the timezone z will now fallback to O and output GMT+1 instead of the complete zone name (e.g. Pacific Standard Time), this is because the quantity of data required to have all the zone names in all of the existing locales is too big.
the timezone Z will now output the ISO8601 basic format, e.g. +0100, you should now use ZZZZ to get GMT+01:00.
You should change your date pipe
Also you need to provide your language in app.module like this:
这篇关于缺少区域设置“ru"的区域设置数据;角 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:缺少区域设置“ru"的区域设置数据;角 5


基础教程推荐
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01
- 直接将值设置为滑块 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01