加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs过滤器’date’和$locale服务

发布时间:2020-12-17 07:41:09 所属栏目:安全 来源:网络整理
导读:看来,angularjs嵌入了一些国际化的资源: Angular supports i18n/l10n for date,number and currency filters. Additionally,Angular supports localizable pluralization support through the ngPluralize directive. All localizable Angular components d
看来,angularjs嵌入了一些国际化的资源:

Angular supports i18n/l10n for date,number and currency filters.
Additionally,Angular supports localizable pluralization support
through the ngPluralize directive. All localizable Angular components
depend on locale-specific rule sets managed by the $locale service.

如果发现$locale service,但不要kwnow如何在fr-fr中指定区域设置

以下代码:

{{article.date_collected | date:'EEEE dd MMMM yyyy'}}

给予:

Monday 06 October 2014

但我想要 :

Lundi 06 Octobre 2014

有什么建议么?

最后,我发现在角度github页面上的响应:
https://github.com/angular/bower-angular-i18n#bower-angular-i18n

编辑:更多的信息,为我工作

在您的根应用程序目录中,从bower安装资源

bower install angular-i18n

添加< script>如果您使用bower / buildjs将所有脚本压缩到vendor.js文件,请在此评论标签之间的index.html:

<!-- endbower -->
<script src="bower_components/angular-i18n/angular-locale_fr-fr.js"></script>
<!-- endbuild -->

而已.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读