我和其他许多人一样,试图让Angular.dart与Polymer.dart一起工作。我也在使用Polymer的核心元素,这是我想坚持使用Polymer的主要原因。我已经将Polymer + core-elements工作得很好,但是当我在混合中引入Angular时,我无法克服依赖约束的混乱。
dependencies:
angular: any
#angular_node_bind: any // I'd like to introduce this later
shadow_dom: any
browser: any
polymer: ">=0.11.0 <0.12.0"
core_elements: ">=0.0.6 <0.1.0"
firebase: ">=0.1.0 <0.2.0"
transformers:
- polymer:
entry_points:
- web/index.html
dependency_overrides:
browser: any
当我介绍angular: any
行时,我得到了:
Incompatible version constraints on html5lib:
- angular 0.0.8 depends on version >=0.8.7 <0.9.0
- polymer 0.11.0+1 depends on version >=0.11.0 <0.12.0
这是我的pubspec.lock
:
# Generated by pub
# See http://pub.dartlang.org/doc/glossary.html#lockfile
packages:
analyzer:
description: analyzer
source: hosted
version: "0.15.7"
args:
description: args
source: hosted
version: "0.11.0+1"
barback:
description: barback
source: hosted
version: "0.14.0+3"
browser:
description: browser
source: hosted
version: "0.10.0+2"
code_transformers:
description: code_transformers
source: hosted
version: "0.1.4+2"
collection:
description: collection
source: hosted
version: "0.9.4"
core_elements:
description: core_elements
source: hosted
version: "0.0.6"
csslib:
description: csslib
source: hosted
version: "0.10.0+1"
firebase:
description: firebase
source: hosted
version: "0.1.0"
html5lib:
description: html5lib
source: hosted
version: "0.11.0+1"
logging:
description: logging
source: hosted
version: "0.9.1+1"
observe:
description: observe
source: hosted
version: "0.10.1+2"
path:
description: path
source: hosted
version: "1.2.1"
polymer:
description: polymer
source: hosted
version: "0.11.0+5"
polymer_expressions:
description: polymer_expressions
source: hosted
version: "0.11.2"
quiver:
description: quiver
source: hosted
version: "0.18.2"
shadow_dom:
description: shadow_dom
source: hosted
version: "0.10.0"
smoke:
description: smoke
source: hosted
version: "0.1.0+1"
source_maps:
description: source_maps
source: hosted
version: "0.9.2+3"
stack_trace:
description: stack_trace
source: hosted
version: "0.9.3+2"
string_scanner:
description: string_scanner
source: hosted
version: "0.0.3"
template_binding:
description: template_binding
source: hosted
version: "0.11.0"
utf:
description: utf
source: hosted
version: "0.9.0"
web_components:
description: web_components
source: hosted
version: "0.4.0"
yaml:
description: yaml
source: hosted
version: "1.1.1"
我的回购:https://github.com/DaveNotik/dart-stack
建议?
相关:
答案 0 :(得分:4)
这是一个正确的依赖性最终覆盖的问题。
这样的事情:
name: my-app
version: 0.0.2
dependencies:
angular: 0.12.0
angular_node_bind: any
browser: any
polymer: ">=0.11.0 <0.12.0"
core_elements: ">=0.0.6 <0.1.0"
paper_elements: any
meta: ">=0.8.8 <0.9.0"
transformers:
- angular:
html_files:
- web/index.html
- polymer:
entry_points:
- web/index.html
- web/index2.html
- web/index3.html
dependency_overrides:
polymer: ">= 0.11.1-dev < 0.12.0"
browser: any
web_components: 0.4.0
analyzer: ">=0.15.6 <0.16.0"
html5lib: ">=0.11.0 <0.12.0"