From 2b66d5c96012744fbfc7ed80bbccd983186c1c9f Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 13 Jun 2018 12:44:19 -0400 Subject: [PATCH] tutorial notes Signed-off-by: Bill Erickson --- ang6-toturial.adoc | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/ang6-toturial.adoc b/ang6-toturial.adoc index a87c45deb..930e363a8 100644 --- a/ang6-toturial.adoc +++ b/ang6-toturial.adoc @@ -7,8 +7,52 @@ == Modules == +Modules serve 2 main functions: + +* Defining entry points for pages +* Importing and exporting dependencies. + +== Modules == + +[source,js] +------------------------------------------------------------------------ +@NgModule({ + declarations: [ + // List of components declared by this module. + // Every component used must be declared exactly once! + ], + imports: [ + // List of imported modules. + // These modules may be needed by the current module + // or simply imported so they can be re-exported (below). + ], + exports: [ + // List of components and modules made implicitly + // available to any module that imports this module. + ], + providers: [ + // List of services available to this module and any + // module that imports this module. + ] +}) +------------------------------------------------------------------------ + +== Component Declaration Hierarchy == + +Module Foo declares Component SomeCompent. +Module Bar wants to use Component SomeCompent. +Module Bar cannot also declare SomeComponent. + +Module Bar must import Module Foo. +OR SomeComp is declared in a new shared module that is imported +by both Foo and Bar. + == Templates == +*ngFor *ngIf + + + == Template Variables == -- 2.11.0