AngularJS:$$选择尝试使用ngAnimate时未定义 [英] AngularJS: $$selectors undefined when trying to use ngAnimate

查看:165
本文介绍了AngularJS:$$选择尝试使用ngAnimate时未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是推动我逼疯了!我试图用角animate.js,但由于某些原因$$ animateProvider(线451)的行$$选择属性未定义。有人可以解释这个属性被填充方式?

此情况在线路617导致查找函数抛出类型错误:未定义无法读取属性''

我的js包括如下:

 <脚本SRC =LIB / jQuery的/ jquery.js和>< / SCRIPT>
<脚本SRC =LIB /引导/ JS / bootstrap.js>< / SCRIPT>
&所述; SCRIPT SRC =LIB /角度/ angular.js>&下; /脚本>
&所述; SCRIPT SRC =LIB /角的sanitize /角sanitize.js>&下; /脚本>
<脚本SRC =LIB /角路由/角route.js>< / SCRIPT>
&所述; SCRIPT SRC =LIB /角动画/角animate.js>&下; /脚本>
<脚本SRC =LIB /角引导/ UI的引导-tpls.js>< / SCRIPT>

CSS包括像这样的:

 <链接rel =stylesheet属性HREF =应用程序/ CSS / bootstrap.css/>
<链接rel =stylesheet属性HREF =LIB /动画,CSS / animate.css/>

和我app.js是这样的:

  VAR应用= angular.module(应用,[
    //角模块(依赖)
    ngRoute',//路由
    ngSanitize',//清理HTML绑定(例如:sidebar.js)
    ngAnimate',//动画
    ui.bootstrap'// UI的引导(例如:旋转木马,分页,对话)
]);

在令人沮丧的是,这的​​的工作,但我不知怎么打破它。我试过清洁和重新下载所有库。任何帮助greatfully好评!

我使用的杯和鲍尔下载/导入。所有文件都present并通过浏览器加载:

 类型错误:无法读取属性未定义''
在查找(角animate.js:617)
在animationRunner(角animate.js:681)
在performAnimation(角animate.js:1284)
在角animate.js:959
在角animate.js:539
。在范围$ get.Scope $消化(angular.js:15606)
。在范围$ get.Scope $申请(angular.js:15824)
在完成(angular.js:10263)
在completeRequest(angular.js:10435)
在XMLHtt prequest.requestLoaded(angular.js:10376)


解决方案

这是由于与角1.4和角度,物料主版本冲突,这就要看1.3。

大概更新版本角角:> = 1.4,在bower.json应该解决这个问题。

This is driving me up the wall! I am trying to use angular-animate.js but some reason the line $$selectors property of $$animateProvider (line 451) is undefined. Can someone explain how this property gets populated?

This situation is causing the lookup function at line 617 to throw "TypeError: Cannot read property '' of undefined"

My js includes look like this:

<script src="lib/jquery/jquery.js"></script>
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular-sanitize/angular-sanitize.js"></script>
<script src="lib/angular-route/angular-route.js"></script>
<script src="lib/angular-animate/angular-animate.js"></script>
<script src="lib/angular-bootstrap/ui-bootstrap-tpls.js"></script>

CSS includes like this:

<link rel="stylesheet" href="app/css/bootstrap.css" />
<link rel="stylesheet" href="lib/animate-css/animate.css"/>

and my app.js like this:

var app = angular.module('app', [
    // Angular modules (dependencies)
    'ngRoute',          // routing
    'ngSanitize',       // sanitizes html bindings (ex: sidebar.js)
    'ngAnimate',        // animations
    'ui.bootstrap'      // ui-bootstrap (ex: carousel, pagination, dialog)
]);

The frustrating thing was that this was working but I've somehow broken it. I've tried cleaning and downloading all the libraries again. Any help greatfully received!

I am using Gulp and Bower to download/import. All the files are present and being loaded by the browser:

TypeError: Cannot read property '' of undefined
at lookup (angular-animate.js:617)
at animationRunner (angular-animate.js:681)
at performAnimation (angular-animate.js:1284)
at angular-animate.js:959
at angular-animate.js:539
at Scope.$get.Scope.$digest (angular.js:15606)
at Scope.$get.Scope.$apply (angular.js:15824)
at done (angular.js:10263)
at completeRequest (angular.js:10435)
at XMLHttpRequest.requestLoaded (angular.js:10376)

解决方案

This is due to a version conflict with angular 1.4 and angular-material master, which depends on 1.3.

Probably updating your angular version ""angular": ">=1.4."," in bower.json should solve this problem.

这篇关于AngularJS:$$选择尝试使用ngAnimate时未定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆