0

使用角矩流星包得到以下错误

angular.js:12332 TypeError: momentValue.toISOString is not a function
    at updateMoment (angular-moment.js:199)
    at Object.fn (angular-moment.js:215)
    at Scope.$get.Scope.$digest (angular.js:15685)
    at Scope.$get.Scope.$apply (angular.js:15953)
    at angular-meteor-meteorCollection.js:160
    at angular.js:17711
    at completeOutstandingRequest (angular.js:5396)
    at angular.js:5668

我在一个地方使用 amTimeAgo 指令:

<li class="hidden-xs"><p class="text-muted text-sm" am-time-ago="obj.createdAt"></p></li>

这是我的包文件:

# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-platform
accounts-ui
accounts-password
fourseven:scss
urigo:angular@=0.9.2
angular:angular
angularui:angular-ui-router
angular:angular-material
angular:angular-mocks
angular:angular-animate
angular:angular-touch
angular:angular-sanitize
angular:angular-cookies
angular:angular-server
tonekk:angular-moment

我的版本文件:

accounts-base@1.2.0
accounts-password@1.1.1
accounts-ui@1.1.5
accounts-ui-unstyled@1.1.7
angular:angular@1.4.2
angular:angular-animate@1.4.2
angular:angular-aria@1.4.2
angular:angular-cookies@1.4.2
angular:angular-material@0.10.0
angular:angular-mocks@1.4.2
angular:angular-sanitize@1.4.2
angular:angular-server@1.4.0
angular:angular-touch@1.4.2
angularui:angular-ui-router@0.2.15
autoupdate@1.2.1
base64@1.0.3
binary-heap@1.0.3
blaze@2.1.2
blaze-tools@1.0.3
boilerplate-generator@1.0.3
callback-hook@1.0.3
check@1.0.5
dburles:mongo-collection-instances@0.3.4
ddp@1.1.0
deps@1.0.7
ejson@1.0.6
email@1.0.6
fastclick@1.0.3
fourseven:scss@3.2.0
geojson-utils@1.0.3
html-tools@1.0.4
htmljs@1.0.4
http@1.1.0
id-map@1.0.3
jquery@1.11.3_2
json@1.0.3
lai:collection-extensions@0.1.4
launch-screen@1.0.2
less@1.0.14
livedata@1.0.13
localstorage@1.0.3
logging@1.0.7
meteor@1.1.6
meteor-platform@1.2.2
minifiers@1.1.5
minimongo@1.0.8
mobile-status-bar@1.0.3
mongo@1.1.0
mrt:moment@1.7.0
npm-bcrypt@0.7.8_2
observe-sequence@1.0.6
ordered-dict@1.0.3
random@1.0.3
reactive-dict@1.1.0
reactive-var@1.0.5
reload@1.1.3
retry@1.0.3
routepolicy@1.0.5
service-configuration@1.0.4
session@1.1.0
sha@1.0.3
spacebars@1.0.6
spacebars-compiler@1.0.6
srp@1.0.3
templating@1.1.1
tonekk:angular-moment@1.0.2
tracker@1.0.7
ui@1.0.6
underscore@1.0.3
urigo:angular@0.9.2
url@1.0.4
webapp@1.2.0
webapp-hashing@1.0.3

知道为什么会发生这种情况吗?

4

2 回答 2

1

在这里提供的杰森自己的答案对我有用,但它...:angular-meteor不是

meteor add jasonaibrahim:angular-moment

在第一次做之后

meteor remove tonekk:angular-moment
于 2015-07-18T14:58:15.887 回答
0

原来我使用的流星包(tonekk:angular-moment)使用的是过时的角矩版本。

我通过使用最新版本的角流星创建自己的流星包来解决这个问题。

meteor add jasonaibrahim:angular-moment

于 2015-07-16T03:23:27.987 回答