Skip to content

Doc: src/app/shared add documentation comments to index.ts #2572

Closed
@arlowhite

Description

@arlowhite

Versions.

angular-cli: 1.0.0-beta.16
node: 6.3.1
os: linux x64

Repro steps.

Create project with ng new

Needed Documentation

angular-cli projects have a shared directory with this file src/app/shared/index.ts

I haven't read through all of the new NgModule docs on angular.io, so I wasn't sure what this was for.

Please add a comment to this file that links to angular.io:
https://angular.io/docs/ts/latest/guide/ngmodule.html#!#shared-module

Also, maybe give a few example ng commands. (angular-cli/tests/acceptance has a couple examples)
ng generate module shared/my-module
ng generate class shared/my-class

Questions

Should the developer modify shared/index.ts?
Do they need to add export * from './my-module' as in src/app/index.ts?

Also, I noticed angular-cli/tests/e2e/tests/build/ts-paths.ts modifies tsconfig.json so that you can import '@shared/my-module;
Should this be added to tsconfig.json by default or should it be documented somewhere?


shared/index.ts

// Directory for Shared Modules
// https://angular.io/docs/ts/latest/guide/ngmodule.html#!#shared-module
//
// You can generate files here with ng, for example:
//  ng generate module shared/my-module
//  ng generate class shared/my-class

Metadata

Metadata

Assignees

Labels

area: docsRelated to the documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions