Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将angular.dart与引导一起使用可生成对象#<;文件>;没有方法';getAttribute';_Dart_Angular Dart_Shadow Dom - Fatal编程技术网

将angular.dart与引导一起使用可生成对象#<;文件>;没有方法';getAttribute';

将angular.dart与引导一起使用可生成对象#<;文件>;没有方法';getAttribute';,dart,angular-dart,shadow-dom,Dart,Angular Dart,Shadow Dom,在bootstrap 3.1.1中使用Angular.dart 0.9.10并编译为Javascript时,我得到了一个丑陋的堆栈跟踪 stacktrace在控制台中随时打印,例如,当我聚焦文本字段或输入一些文本时 这在以前是有效的,所以我想知道这是否是shadow_dom实现的一个bug 该应用程序目前非常简单,可与Dartium正确配合使用。在Firefox和Chrome中编译javascript后也会出现同样的问题 当我从index.html中删除下面的行时,它会起作用 <scrip

在bootstrap 3.1.1中使用Angular.dart 0.9.10并编译为Javascript时,我得到了一个丑陋的堆栈跟踪

stacktrace在控制台中随时打印,例如,当我聚焦文本字段或输入一些文本时

这在以前是有效的,所以我想知道这是否是shadow_dom实现的一个bug

该应用程序目前非常简单,可与Dartium正确配合使用。在Firefox和Chrome中编译javascript后也会出现同样的问题

当我从index.html中删除下面的行时,它会起作用

<script src="packages/shadow_dom/shadow_dom.debug.js"></script>

纯文本中的堆栈跟踪:

TypeError {stack: "TypeError: Object # has no method 'getAt…/packages/shadow_dom/shadow_dom.debug.js:2805:28)", message: "Object # has no method 'getAttribute'"} message: "Object # has no method 'getAttribute'" stack: "TypeError: Object # has no method 'getAttribute'↵ at Function.Sizzle.attr (http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9)↵ at Array. (http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25)↵ at http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22↵ at superMatcher (http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12)↵ at select (http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28)↵ at Function.Sizzle (http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9)↵ at HTMLDocument.jQuery.event.handlers (http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48)↵ at HTMLDocument.jQuery.event.dispatch (http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40)↵ at Document.elemData.handle (http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28)↵ at invoke (http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)" __proto__: Error constructor: function TypeError() { [native code] } name: "TypeError" stack: undefined __proto__: d "TypeError: Object # has no method 'getAttribute' at Function.Sizzle.attr (http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9) at Array. (http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25) at http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22 at superMatcher (http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12) at select (http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28) at Function.Sizzle (http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9) at HTMLDocument.jQuery.event.handlers (http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48) at HTMLDocument.jQuery.event.dispatch (http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40) at Document.elemData.handle (http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28) at invoke (http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)" TypeError{stack:“TypeError:Object#没有方法'getAt…/packages/shadow_dom/shadow_dom.debug.js:2805:28)”,消息:“Object#没有方法'getAttribute'” 消息:“对象#没有方法'getAttribute'” 堆栈:“TypeError:对象#没有方法'getAttribute'↵ 在Function.Sizzle.attr(http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9)↵ 在阵列上(http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25)↵ 在http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22↵ 超级竞赛(http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12)↵ 选择(http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28)↵ 在宴会上,嘶嘶作响(http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9)↵ 在HTMLDocument.jQuery.event.handlers(http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48)↵ 在HTMLDocument.jQuery.event.dispatch(http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40)↵ 位于Document.elemData.handle(http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28)↵ 在调用时(http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)" __原型:错误 构造函数:函数TypeError(){[本机代码]} 名称:“TypeError” 堆栈:未定义 __原型:d “TypeError:对象#没有方法'getAttribute' 在Function.Sizzle.attr(http://localhost:8000/bower_components/jquery/dist/jquery.js:1422:9) 在阵列上(http://localhost:8000/bower_components/jquery/dist/jquery.js:1618:25) 在http://localhost:8000/bower_components/jquery/dist/jquery.js:2116:22 超级竞赛(http://localhost:8000/bower_components/jquery/dist/jquery.js:2322:12) 选择(http://localhost:8000/bower_components/jquery/dist/jquery.js:2483:28) 在宴会上,嘶嘶作响(http://localhost:8000/bower_components/jquery/dist/jquery.js:838:9) 在HTMLDocument.jQuery.event.handlers(http://localhost:8000/bower_components/jquery/dist/jquery.js:4416:48) 在HTMLDocument.jQuery.event.dispatch(http://localhost:8000/bower_components/jquery/dist/jquery.js:4353:40) 位于Document.elemData.handle(http://localhost:8000/bower_components/jquery/dist/jquery.js:4057:28) 在调用时(http://localhost:8000/packages/shadow_dom/shadow_dom.debug.js:2805:28)"
我不确定确切的细节原因,但angular dart有一个boostrap实现:

很可能,这个对你来说会更好

致以最良好的祝愿,
Paul

似乎shadow\u dom polyfill与jQuery冲突。也许你的shadow_dom包被角度更新更新了?您使用的是哪个版本的shadow_dom包?查看pubspec.lock时,会发现我使用的是0.9.2的shadow dom。(和JQuery的2.1.0)据我所知,Angular 0.9.9使用了相同的版本。我不期望有不同的结果,但你能尝试使用‘shadow_dom.min.js’而不是‘shadow_dom.debug.js’吗?是的,这与缩小的文件是一样的:
{stack:“TypeError:Object#没有方法‘getAttribute…00/packages/shadow#dom/shadow dom.min.js:1:27285)”,消息:“Object#没有方法‘getAttribute’”“TypeError:Object#没有方法‘getAttribute’
谢谢,我会看一看。