docs(cheatsheet): update javascript sections (#11070)

This commit is contained in:
Jesús Rodríguez
2016-08-25 20:12:23 +02:00
committed by Victor Berchet
parent dc6f72e963
commit cc79dcac7f
3 changed files with 18 additions and 6 deletions

View File

@ -3,7 +3,7 @@ Built-in directives
@cheatsheetIndex 3 @cheatsheetIndex 3
@description @description
{@target ts}`import { CommonModule } from '@angular/common';`{@endtarget} {@target ts}`import { CommonModule } from '@angular/common';`{@endtarget}
{@target js}Available from the `ng.common.CommonModule` namespace{@endtarget} {@target js}Available using the `ng.common.CommonModule` module{@endtarget}
{@target dart}Available using `platform_directives` in pubspec{@endtarget} {@target dart}Available using `platform_directives` in pubspec{@endtarget}
@cheatsheetItem @cheatsheetItem

View File

@ -3,7 +3,7 @@ Forms
@cheatsheetIndex 4 @cheatsheetIndex 4
@description @description
{@target ts}`import { FormsModule } from '@angular/forms';`{@endtarget} {@target ts}`import { FormsModule } from '@angular/forms';`{@endtarget}
{@target js}Available from `ng.forms.FormsModule`{@endtarget} {@target js}Available using the `ng.forms.FormsModule` module{@endtarget}
{@target dart}Available using `platform_directives` in pubspec{@endtarget} {@target dart}Available using `platform_directives` in pubspec{@endtarget}
@cheatsheetItem @cheatsheetItem

View File

@ -2,15 +2,21 @@
NgModules NgModules
@cheatsheetIndex 1 @cheatsheetIndex 1
@description @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 @cheatsheetItem
syntax(ts js): syntax(ts):
`@NgModule({ declarations: ... , imports: ..., exports: ..., bootstrap: ...}) `@NgModule({ declarations: ..., imports: ..., exports: ..., bootstrap: ...})
class MyModule {}`|`NgModule` class MyModule {}`|`NgModule`
description: description:
Defines a module that contains components, directives, pipes and providers. 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 @cheatsheetItem
syntax(ts js): syntax(ts js):
@ -19,12 +25,18 @@ description:
List of components, directives and pipes that belong to this module. List of components, directives and pipes that belong to this module.
@cheatsheetItem @cheatsheetItem
syntax(ts js): syntax(ts):
`imports: [BrowserModule, SomeOtherModule]`|`imports:` `imports: [BrowserModule, SomeOtherModule]`|`imports:`
description: description:
List of modules that are being imported into this module. Everything from the imported modules will List of modules that are being imported into this module. Everything from the imported modules will
be available to `declarations` of this module. 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 @cheatsheetItem
syntax(ts js): syntax(ts js):
`exports: [MyRedComponent, MyDatePipe]`|`exports:` `exports: [MyRedComponent, MyDatePipe]`|`exports:`