docs(cheatsheet): update javascript sections (#11070)
This commit is contained in:

committed by
Victor Berchet

parent
dc6f72e963
commit
cc79dcac7f
@ -2,15 +2,21 @@
|
||||
NgModules
|
||||
@cheatsheetIndex 1
|
||||
@description
|
||||
{@target ts js}`import { NgModule } from '@angular/core';`{@endtarget}
|
||||
{@target ts}`import { NgModule } from '@angular/core';`{@endtarget}
|
||||
{@target js}Available from the `ng.core` namespace{@endtarget}
|
||||
|
||||
@cheatsheetItem
|
||||
syntax(ts js):
|
||||
`@NgModule({ declarations: ... , imports: ..., exports: ..., bootstrap: ...})
|
||||
syntax(ts):
|
||||
`@NgModule({ declarations: ..., imports: ..., exports: ..., bootstrap: ...})
|
||||
class MyModule {}`|`NgModule`
|
||||
description:
|
||||
Defines a module that contains components, directives, pipes and providers.
|
||||
|
||||
syntax(js):
|
||||
`ng.core.NgModule({declarations: ..., imports: ..., exports: ..., bootstrap: ...}).
|
||||
class({ constructor: function() {}})`
|
||||
description:
|
||||
Defines a module that contains components, directives, pipes and providers.
|
||||
|
||||
@cheatsheetItem
|
||||
syntax(ts js):
|
||||
@ -19,12 +25,18 @@ description:
|
||||
List of components, directives and pipes that belong to this module.
|
||||
|
||||
@cheatsheetItem
|
||||
syntax(ts js):
|
||||
syntax(ts):
|
||||
`imports: [BrowserModule, SomeOtherModule]`|`imports:`
|
||||
description:
|
||||
List of modules that are being imported into this module. Everything from the imported modules will
|
||||
be available to `declarations` of this module.
|
||||
|
||||
syntax(js):
|
||||
`imports: [ng.platformBrowser.BrowserModule, SomeOtherModule]`|`imports:`
|
||||
description:
|
||||
List of modules that are being imported into this module. Everything from the imported modules will
|
||||
be available to `declarations` of this module.
|
||||
|
||||
@cheatsheetItem
|
||||
syntax(ts js):
|
||||
`exports: [MyRedComponent, MyDatePipe]`|`exports:`
|
||||
|
Reference in New Issue
Block a user