angular支持日期、數字、貨幣等數據的本地化。使用$locale服務實現日期本地化很是方便。angularjs
首先安裝ngLocale:ide
bower install ngLocaleui
而後對須要的語言js文件進行合併,好比angular-locale_zh-cn.jsbower
最後在controller引入$locale服務便可get
參考:io
https://docs.angularjs.org/guide/i18nangular
跳轉到新頁面回滾至頂端問題:gui
http://stackoverflow.com/questions/21055952/changing-route-doesnt-scroll-to-top-in-the-new-pageroute