From cc79dcac7feceef777200156f02229fa91fadce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Rodr=C3=ADguez?= Date: Thu, 25 Aug 2016 20:12:23 +0200 Subject: [PATCH] docs(cheatsheet): update javascript sections (#11070) --- .../docs/cheatsheet/built-in-directives.md | 2 +- modules/@angular/docs/cheatsheet/forms.md | 2 +- modules/@angular/docs/cheatsheet/ngmodules.md | 20 +++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/@angular/docs/cheatsheet/built-in-directives.md b/modules/@angular/docs/cheatsheet/built-in-directives.md index ac02b66b9d..eab609e48c 100644 --- a/modules/@angular/docs/cheatsheet/built-in-directives.md +++ b/modules/@angular/docs/cheatsheet/built-in-directives.md @@ -3,7 +3,7 @@ Built-in directives @cheatsheetIndex 3 @description {@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} @cheatsheetItem diff --git a/modules/@angular/docs/cheatsheet/forms.md b/modules/@angular/docs/cheatsheet/forms.md index 6dc856ea64..c6fc8d03dc 100644 --- a/modules/@angular/docs/cheatsheet/forms.md +++ b/modules/@angular/docs/cheatsheet/forms.md @@ -3,7 +3,7 @@ Forms @cheatsheetIndex 4 @description {@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} @cheatsheetItem diff --git a/modules/@angular/docs/cheatsheet/ngmodules.md b/modules/@angular/docs/cheatsheet/ngmodules.md index 0ea119e818..b22ad40751 100644 --- a/modules/@angular/docs/cheatsheet/ngmodules.md +++ b/modules/@angular/docs/cheatsheet/ngmodules.md @@ -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:`