我开发一个模块化的网站角2镖应用,其中模块是可以互换的,并各自携带自己的责任/功能使用NgModule的。我开始与下面的链接:角2镖:在镖
https://angular.io/docs/dart/latest/guide/ngmodule.html,但文件没有完成......我继续与打字稿参考,在那里我学到@NgModule
我试图实现@NgModule但甚至无法找到它在镖包源代码中,我如何完成Dart中多个组件,指令,它们的服务和管道的分组?是否有像TypeScript中的@NgModule?
我试图引导多个应用程序根组件,它工作,但我不相信这是一个正确的解决方案的问题。如果不是,我该如何分享数据?
我main.dart我有:
import 'package:angular2/platform/browser.dart';
import 'package:test/app_component.dart';
import 'package:test/app1_component.dart';
main() {
bootstrap(AppComponent);
bootstrap(App1Component);
}
凡AppComponent和App1Component是根应用组件;这将是相当于@NgModule在https://angular.io/docs/ts/latest/guide/ngmodule.html