gpt4 book ai didi

angularjs - ngAnimate 导致错误

转载 作者:行者123 更新时间:2023-12-02 23:46:05 26 4
gpt4 key购买 nike

Error: f.element._data is not a function t@http://localhost:3000/lib/angular-animate/angular-animate.min.js:10 .enter/<@http://localhost:3000/lib/angular-animate/angular-animate.min.js:14 Ad/this.$get</h.prototype.$digest@http://localhost:3000/lib/angular/angular.min.js:101 Ad/this.$get</h.prototype.$apply@http://localhost:3000/lib/angular/angular.min.js:103 f@http://localhost:3000/lib/angular/angular.min.js:67 H@http://localhost:3000/lib/angular/angular.min.js:71 od/</C.onreadystatechange@http://localhost:3000/lib/angular/angular.min.js:72 

这就是我收到的错误。除了包含 Angular 动画文件之外,我没有做任何其他事情:<script type="text/javascript" src="/lib/angular-animate/angular-animate.min.js"></script>并将其包含在我的应用程序中:

angular.module('mean', ['ngCookies', 'ngResource', 'ngRoute', 'ngAnimate', 'ui.bootstrap', 'mean.system', 'mean.articles', 'mgcrea.ngStrap', 'pascalprecht.translate']);

最佳答案

您正在使用 angular-animate 版本 1.2.13 ,但您的 angular.js 版本较旧。

<小时/>

This commit是 angular.js 版本 1.2.13 的一部分:

chore(jqLite): expose the _data lookup function to angular.element

!!! This is an undocumented "private" function !!!

var jqData = JQLite._data = function(node) {
//jQuery always returns an object on cache miss
return this.cache[node[this.expando]] || {};
};
<小时/>

Angular 动画: the line that uses the new 1.2.13 API

var elementEvents = angular.element._data(node);
<小时/>

始终确保您的 angular.js 版本与所有 Angular 模块同步。

关于angularjs - ngAnimate 导致错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21812484/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com