“没有'焦点行动'的吸气剂。” Dart中的例外

时间:2014-09-14 09:07:26

标签: dart dart-polymer angular-dart paper-elements

我正在尝试将Polymer纸张输入元素绑定到Angular变量,但是我得到了这个例外:

No getter for 'focusAction'.

STACKTRACE:
#0      StaticClosureMap.lookupGetter (package:angular/core/parser/static_closure_map.dart:15:25)
#1      DynamicParserBackend.newAccessScope (package:angular/core/parser/dynamic_parser.dart:112:38)
#2      DynamicParserImpl.parseAccessOrCallScope (package:angular/core/parser/dynamic_parser_impl.dart:257:67)
#3      DynamicParserImpl.parsePrimary (package:angular/core/parser/dynamic_parser_impl.dart:239:36)
#4      DynamicParserImpl.parseAccessOrCallMember (package:angular/core/parser/dynamic_parser_impl.dart:193:30)
#5      DynamicParserImpl.parsePrefix (package:angular/core/parser/dynamic_parser_impl.dart:188:37)
#6      DynamicParserImpl.parseMultiplicative (package:angular/core/parser/dynamic_parser_impl.dart:163:29)
#7      DynamicParserImpl.parseAdditive (package:angular/core/parser/dynamic_parser_impl.dart:149:37)
#8      DynamicParserImpl.parseRelational (package:angular/core/parser/dynamic_parser_impl.dart:131:31)
#9      DynamicParserImpl.parseEquality (package:angular/core/parser/dynamic_parser_impl.dart:117:33)
#10     DynamicParserImpl.parseLogicalAnd (package:angular/core/parser/dynamic_parser_impl.dart:108:31)
#11     DynamicParserImpl.parseLogicalOr (package:angular/core/parser/dynamic_parser_impl.dart:99:33)
#12     DynamicParserImpl.parseConditional (package:angular/core/parser/dynamic_parser_impl.dart:83:32)
#13     DynamicParserImpl.parseExpression (package:angular/core/parser/dynamic_parser_impl.dart:68:34)
#14     DynamicParserImpl.parseFormatter (package:angular/core/parser/dynamic_parser_impl.dart:53:33)
#15     DynamicParserImpl.parsePrimary (package:angular/core/parser/dynamic_parser_impl.dart:220:34)
#16     DynamicParserImpl.parseAccessOrCallMember (package:angular/core/parser/dynamic_parser_impl.dart:193:30)
#17     DynamicParserImpl.parsePrefix (package:angular/core/parser/dynamic_parser_impl.dart:188:37)
#18     DynamicParserImpl.parseMultiplicative (package:angular/core/parser/dynamic_parser_impl.dart:163:29)
#19     DynamicParserImpl.parseAdditive (package:angular/core/parser/dynamic_parser_impl.dart:149:37)
#20     DynamicParserImpl.parseRelational (package:angular/core/parser/dynamic_parser_impl.dart:131:31)
#21     DynamicParserImpl.parseEquality (package:angular/core/parser/dynamic_parser_impl.dart:117:33)
#22     DynamicParserImpl.parseLogicalAnd (package:angular/core/parser/dynamic_parser_impl.dart:108:31)
#23     DynamicParserImpl.parseLogicalOr (package:angular/core/parser/dynamic_parser_impl.dart:99:33)
#24     DynamicParserImpl.parseConditional (package:angular/core/parser/dynamic_parser_impl.dart:83:32)
#25     DynamicParserImpl.parseExpression (package:angular/core/parser/dynamic_parser_impl.dart:68:34)
#26     DynamicParserImpl.parseFormatter (package:angular/core/parser/dynamic_parser_impl.dart:53:33)
#27     DynamicParserImpl.parseChain (package:angular/core/parser/dynamic_parser_impl.dart:35:32)
#28     DynamicParser._parse (package:angular/core/parser/dynamic_parser.dart:40:46)
#29     DynamicParser.call.<anonymous closure> (package:angular/core/parser/dynamic_parser.dart:35:50)
#30     _HashMap.putIfAbsent (dart:collection-patch/collection_patch.dart:124)
#31     DynamicParser.call (package:angular/core/parser/dynamic_parser.dart:35:30)
#32     ASTParser.call (package:angular/change_detection/ast_parser.dart:33:22)
#33     DirectiveSelector.matchElement.<anonymous closure>.<anonymous closure> (package:angular/core_dom/selector.dart:109:38)
#34     List.forEach (dart:core-patch/growable_array.dart:228)
#35     DirectiveSelector.matchElement.<anonymous closure> (package:angular/core_dom/selector.dart:106:55)
#36     _AttributeMap.forEach (dart:html:33642)
#37     DirectiveSelector.matchElement (package:angular/core_dom/selector.dart:90:31)
#38     Compiler._elementBinderForNode (package:angular/core_dom/compiler.dart:39:43)
#39     Compiler._compileView (package:angular/core_dom/compiler.dart:129:32)
#40     Compiler._compileNode (package:angular/core_dom/compiler.dart:85:23)
#41     Compiler._compileView (package:angular/core_dom/compiler.dart:128:19)
#42     Compiler._compileNode (package:angular/core_dom/compiler.dart:85:23)
#43     Compiler._compileView (package:angular/core_dom/compiler.dart:128:19)
#44     Compiler.call (package:angular/core_dom/compiler.dart:16:17)
#45     Application.run.<anonymous closure>.<anonymous closure> (package:angular/application.dart:191:47)
#46     _rootRunUnary (dart:async/zone.dart:836)
#47     _ZoneDelegate.runUnary (dart:async/zone.dart:466)
#48     _onRunUnary.<anonymous closure> (package:angular/core/zone.dart:117:63)
#49     VmTurnZone._onRunBase (package:angular/core/zone.dart:99:16)
#50     _onRunUnary (package:angular/core/zone.dart:117:17)
#51     _CustomZone.runUnary (dart:async/zone.dart:748)
#52     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:488)
#53     _Future._propagateToListeners (dart:async/future_impl.dart:571)
#54     _Future._completeWithValue (dart:async/future_impl.dart:331)
#55     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:393)
#56     _rootRun (dart:async/zone.dart:829)
#57     _ZoneDelegate.run (dart:async/zone.dart:459)
#58     _onScheduleMicrotask.<anonymous closure> (package:angular/core/zone.dart:122:45)
#59     VmTurnZone._finishTurn (package:angular/core/zone.dart:152:34)
#60     VmTurnZone._onRunBase (package:angular/core/zone.dart:106:43)
#61     _onRun (package:angular/core/zone.dart:113:17)
#62     _CustomZone.run (dart:async/zone.dart:740)
#63     VmTurnZone.run (package:angular/core/zone.dart:241:40)
#64     Application.run (package:angular/application.dart:180:22)
#65     main.<anonymous closure> (http://localhost:8080/angularpaper.dart:16:190)
#66     _RootZone.run (dart:async/zone.dart:1077)
#67     main (http://localhost:8080/angularpaper.dart:15:7)

HTML页面:

<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Angular paper elements binding</title>

    <link rel="import" href="packages/polymer/polymer.html">
    <link rel="import" href="packages/paper_elements/paper_input.html">

    <link rel="stylesheet" href="angularpaper.css">
  </head>
  <body>
    <h1>Angular paper elements binding</h1>

     <p>
      <label>
        Change the value through an ng-model bound input box:
         <input type="text" ng-model="curValue">
      </label>

       <paper-input label="Paper element" bind-value="curValue"></paper-input>
     </p>

    <script async type="application/dart" src="angularpaper.dart"></script>
    <script async src="packages/browser/dart.js"></script>
  </body>
</html>

Dart代码:

import 'package:polymer/polymer.dart';
import 'package:angular/application_factory.dart';

// HACK until we fix code gen size. This doesn't really fix it,
// just makes it better.
@MirrorsUsed(override: '*')
import 'dart:mirrors';

void main() {
  initPolymer()
  .run(() {
    applicationFactory().run();
  })
  ;
}

Yaml文件:

name: angularpaper
description: A angular paper elements binding example

dependencies:
  angular: 0.14.0
  polymer: 0.14.0
  paper_elements: 0.2.0
  browser: any

dependency_overrides:
  args: '>=0.11.0 <0.13.0'
  code_transformers: '>=0.2.3 <0.3.0'
  html5lib: '>=0.12.0 <0.13.0'

transformers:
  - angular
  - polymer:
      entry_points: web/angularpaper.html

0 个答案:

没有答案