-
Notifications
You must be signed in to change notification settings - Fork 26.2k
docs: NgModule guide prose for CLI (partial) #19776
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
Conversation
201191b
to
4acc5f3
Compare
4acc5f3
to
dfd1f60
Compare
dfd1f60
to
40290ab
Compare
You can preview 40290ab at https://pr19776-40290ab.ngbuilds.io/. |
40290ab
to
c24bb83
Compare
You can preview c24bb83 at https://pr19776-c24bb83.ngbuilds.io/. |
c24bb83
to
596e941
Compare
You can preview 596e941 at https://pr19776-596e941.ngbuilds.io/. |
596e941
to
92d857c
Compare
You can preview 92d857c at https://pr19776-92d857c.ngbuilds.io/. |
92d857c
to
a1f1299
Compare
You can preview a1f1299 at https://pr19776-a1f1299.ngbuilds.io/. |
Ich kehre zurück am 01.11.2017.
Ich werde Ihre Nachricht nach meiner Rückkehr beantworten.
In dringenden Fällen senden Sie bitte eine Kopie Ihrer E-Mail für
technische Angelegenheiten an entwicklung@arxes-tolina.de, ansonsten an
info@arxes-tolina.de. Ein anderer Mitarbeiter wird sich dann Ihrer E-Mail
annehmen.
Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht "Re:
[angular/angular] docs: NgModule guide prose for CLI (partial) (#19776)"
gesendet am 23.10.2017 02:41:18.
Diese ist die einzige Benachrichtigung, die Sie empfangen werden, während
diese Person abwesend ist.
|
c9d8ecc
to
cb8631e
Compare
You can preview cb8631e at https://pr19776-cb8631e.ngbuilds.io/. |
cb8631e
to
ed10b8f
Compare
You can preview ed10b8f at https://pr19776-ed10b8f.ngbuilds.io/. |
ed10b8f
to
c7c5f1f
Compare
Ich kehre zurück am 01.11.2017.
Ich werde Ihre Nachricht nach meiner Rückkehr beantworten.
In dringenden Fällen senden Sie bitte eine Kopie Ihrer E-Mail für
technische Angelegenheiten an entwicklung@arxes-tolina.de, ansonsten an
info@arxes-tolina.de. Ein anderer Mitarbeiter wird sich dann Ihrer E-Mail
annehmen.
Hinweis: Dies ist eine automatische Antwort auf Ihre Nachricht "Re:
[angular/angular] docs: NgModule guide prose for CLI (partial) (#19776)"
gesendet am 23.10.2017 12:23:49.
Diese ist die einzige Benachrichtigung, die Sie empfangen werden, während
diese Person abwesend ist.
|
348de03
to
6e59283
Compare
You can preview 6e59283 at https://pr19776-6e59283.ngbuilds.io/. |
cc3c492
to
7381a36
Compare
You can preview 7381a36 at https://pr19776-7381a36.ngbuilds.io/. |
7381a36
to
9a9f9ab
Compare
You can preview 9a9f9ab at https://pr19776-9a9f9ab.ngbuilds.io/. |
@gkalpak Not sure why but apparently this PR needs your OK. It's part of the samples->CLI project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice piece of work @wardbell. I have approved it with a handful (~40!) minor comments, from which you can pick and choose before labelling for merge.
@@ -1,14 +1,19 @@ | |||
import { NgModule } from '@angular/core'; | |||
import { Routes, RouterModule } from '@angular/router'; | |||
|
|||
export const routes: Routes = [ | |||
import { ContactModule } from './contact/contact.module.3'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unusual whitespace?
|
||
import { FormsModule } from '@angular/forms'; | ||
import { ContactService } from './contact/contact.service'; | ||
import { ContactHighlightDirective } from './contact/contact-highlight.directive'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it a conscious decision to align the from
s unless the import is too wide?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was aligning imports for readability for a long time. But it's difficult to maintain and I'm abandoning that effort as I go. In this PR, due to time/money constraints, I'll limit adjustments to the worst cases that you've identified.
@@ -1,4 +1,4 @@ | |||
/* tslint:disable */ | |||
// #docplaster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not related to this PR but we should get agreement from "someone" to change the default doc-plaster to the empty string :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lost that battle so long ago ... as in on DAY ONE. You're welcome to take it up again.
[(ngModel)]="contact.name" | ||
name="name" #name="ngModel" > | ||
[(ngModel)]="contact.name" | ||
name="name" #name="ngModel" > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should these attributes be indented or is this a conscious coding style in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indented. Something messed it up. Fixing.
export class ContactService implements OnDestroy { | ||
// #enddocregion | ||
constructor() { console.log('ContactService instance created.'); } | ||
ngOnDestroy() { console.log('ContactService instance destroyed.'); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these just here for your debugging or important parts of the example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahah! I see you mention them here: https://github.com/angular/angular/pull/19776/files#diff-ed3e5f8edaa8c7b9920b0579fa7afe51R1131
aio/content/guide/ngmodule.md
Outdated
|
||
<div class="l-sub-section"> | ||
|
||
|
||
|
||
A lazy-loaded module location is a _string_, not a _type_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The references to "module" in this paragraph need changing to NgModule.
aio/content/guide/ngmodule.md
Outdated
</code-example> | ||
|
||
Re-exporting `RouterModule` makes the router directives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
superfluous space
aio/content/guide/ngmodule.md
Outdated
highlight.directive.ts | ||
</div> | ||
Do not import the `HeroModule` or `CrisisModule` or any of their classes outside of their respective file folders. | ||
If you do, you will unintentionally load those modules and all of their code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unintentionally "eager" load?
aio/content/guide/ngmodule.md
Outdated
<div class="alert is-critical"> | ||
|
||
|
||
|
||
Do *not* specify app-wide singleton `providers` in a shared module. | ||
A lazy-loaded module that imports that shared module makes its own copy of the service. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lazy-loaded NgModule
aio/content/guide/ngmodule.md
Outdated
The `@NgModule` metadata should be familiar. | ||
You declare the `TitleComponent` because this module owns it and you export it | ||
because `AppComponent` (which is in `AppModule`) displays the title in its template. | ||
You declare the `TitleComponent` because this module owns it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module -> NgModule
Also replaces “Angular Module” with “NgModule” wherever that is clarifying. Continue using “module” when qualified as in “feature module”, “root module”, “routing module”, etc.
9a9f9ab
to
02f40d3
Compare
@petebacondarwin Adopted almost all of your most-welcome suggestions. Will add the merge label as soon as it clears CI. Thanks again! |
You can preview 02f40d3 at https://pr19776-02f40d3.ngbuilds.io/. |
The CI fail is a flake - a SauceLabs timeout - that has nothing to do with this PR. |
@wardbell all docs changes should go to both master and patch, please label accordingly next time. |
Also replaces “Angular Module” with “NgModule” wherever that is clarifying. Continue using “module” when qualified as in “feature module”, “root module”, “routing module”, etc. PR Close #19776
@mhevery - that may not be the case! If the docs change refers to something that is only on master then it would not make sense to land it on patch. I accept that in this case @wardbell may have forgotten that patch now refers to 5.x (whereas recently it referred to 4.x) so it is very likely that this is supposed to land on both. |
@petebacondarwin @mhevery Yes, I thought patch was still 4.x. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
See Issue #19510
BEGINS necessary changes for NgModules guide ... before I realized that the changes that @kapunahelewong is making have not yet been merged! Handing this off to her.
Update 10/20
@kapunahelewong says we should finish this PR because her substantial changes to NgModules guide will not be ready soon enough. She will incorporate the changes in this PR into her work at her future convenience.
Update 10/23
I think it's "done". At least it's done enough to count as converted for CLI.
Update 10/25
Also replaces “Angular Module” with “NgModule” wherever that is clarifying.
Continue using “module” when qualified as in “feature module”, “root module”, “routing module”, etc.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?