Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
arlowhite opened this issue Oct 7, 2016 · 3 comments · Fixed by #2623
Closed

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

arlowhite opened this issue Oct 7, 2016 · 3 comments · Fixed by #2623
Assignees
Labels
area: docs Related to the documentation

Comments

@arlowhite
Copy link

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
@filipesilva filipesilva added the area: docs Related to the documentation label Oct 10, 2016
@filipesilva
Copy link
Contributor

@Brocco what do you think about adding comment docs to shared/?

Regarding @shared/my-module, I don't think we should add documentation around it since it's a TypeScript feature. We simply added support for it.

@Brocco
Copy link
Contributor

Brocco commented Oct 10, 2016

The idea of shared/index.ts is a hold over from supporting barrels, and can be removed from newly generated projects. I will submit a PR.

@Brocco Brocco self-assigned this Oct 10, 2016
Brocco added a commit to Brocco/angular-cli that referenced this issue Oct 10, 2016
Brocco added a commit to Brocco/angular-cli that referenced this issue Oct 13, 2016
Brocco added a commit to Brocco/angular-cli that referenced this issue Oct 13, 2016
Brocco added a commit to Brocco/angular-cli that referenced this issue Oct 17, 2016
kieronqtran pushed a commit to kieronqtran/angular-cli that referenced this issue Oct 21, 2016
texel pushed a commit to splice/angular-cli that referenced this issue Nov 3, 2016
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: docs Related to the documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants