我一直在学习角镖距今约3个星期前,但我有真的很难与它特别,对于这种新语言的学习资源实在有限。不管怎么说,我的问题是我无法从“角画廊节”库中导入任何东西。就像当我尝试:
import'package:angular_gallery_section/annotation/gallery_section_config.dart';
要么
import 'package:angular_gallery_section/annotation/gallery_section_config.dart';
所以我不能导入来自angular_gallery_section库中的任何东西(总有一个错误)
我试着调整“pubspec.yaml”文件是这样的:
environment:
sdk: '>=2.1.0-dev.5.0 <3.0.0'
# angular_gallery:
# arget: ":angular_gallery"
# import: "package:angular_gallery/builders.dart"
# builder_factories: [galleryAppBuilder, galleryLibBuilder, syntaxHighlightBuilder]
# build_extensions: {
# ".html": [".dart"],
# "$web$": ["index.html", "main.dart", "style.scss"]}
dependencies:
angular: ^5.1.0
# angular_gallery_section:
# path: ../../angular_gallery_sections
angular_forms: ^2.1.0
async: ^2.0.8
build: '>=0.11.1 <2.0.0'
build_config: '>=0.2.6 <0.4.0'
built_collection: ^4.0.0
collection: ^1.14.10
angular_components: '>=0.9.0 <=0.10.0'
angular_router: ^2.0.0-alpha+19
sass_builder: ^2.0.2
intl: '>=0.14.0 <0.16.0'
glob: ^1.1.5
markdown: ^2.0.0
dev_dependencies:
path: ^1.6.1
test: ^1.0.0
build_web_compilers: '>=0.3.6 <0.5.0'
build_runner: '>=0.8.10 <2.0.0'
但问题还没有得到解决,然而对于该angular_gallery_section的路径没有工作,所以我想我真的错过了:(
代替
# angular_gallery_section:
# path: ../../angular_gallery_sections
加
angular_gallery_section:
git:
url: [email protected]:dart-lang/angular_components_example.git
path: angular_gallery_section