Repository navigation
Conversation
|
Thank you, @bampakoa. I thought you meant to call methods from within ngOnInit() {
setItems();
}
setItems() {
this.items = this.cartService.getItems();
}This is a point I've been corrected on before (so it has stayed in my mind!). What do you think? |
|
@kapunahelewong you are right. This is also the way that I follow in my projects. But isn't it too complicated for a Getting Started guide? I mean the purpose is to show them the proper way of calling services in a component. This looks to be more of a coding style as in Angular Style Guide. |
|
You can preview c196b19 at https://pr32273-c196b19.ngbuilds.io/. |
|
Hey @bampakoa, this looks good. Would you rebase to see if we could get that test passing? |
kapunahelewong
left a comment
There was a problem hiding this comment.
LGTM, thank you @bampakoa!!
|
Caretaker, this is a docs-only change. Thank you! |
|
@gkalpak sure. Bear in mind that it still appears in the list of suggested scopes during commit 😉 |
… guide Call data services inside ngOnInit interface implementation of components. closes #32048
That doesn't sound right. Where exactly does it appear? |
|
merge-assistance: Global approval for this docs-only change. |
|
@gkalpak When I tried to commit my change initially through Visual Studio Code, I got a notification (correctly) that my commit message does not follow the guidelines of the repository. It specifically suggested me a list of scopes where aio was included. After a search I think that it is due to this |
|
This is a custom config file that VSCode should have no idea about 😁 |
|
It came from the Git output window of the VSCode when I tried to commit. I thought that |
|
Oh, it is the commitmsg git hook. Yes, you are right. That's where the error message comes from 😁 EDIT: See #32341. |
The `aio` commit message scope was renamed to `docs-infra` (which is more descriptive) in angular#24295. Although it has been removed from the documentation, the legacy `aio` scope was kept in the [list of valid scopes][1] to cater for in-flight PRs that already used it. As a result, it still shows up as a recommended, valid scope in the error message shown when commit message validation fails during `git commit`. This is misleading, especially for new contributors. Since we have been "manually" discouraging people from using `aio`, there should be no open PRs by now (and if there are, they should be changed to `docs-infra`), so it is safe to remove it from the list of allowed scopes. Related discussion: angular#32273 (review) [1]: https://github.com/angular/angular/blob/3df54be9e/tools/validate-commit-message/commit-message.json#L16
The `aio` commit message scope was renamed to `docs-infra` (which is more descriptive) in #24295. Although it has been removed from the documentation, the legacy `aio` scope was kept in the [list of valid scopes][1] to cater for in-flight PRs that already used it. As a result, it still shows up as a recommended, valid scope in the error message shown when commit message validation fails during `git commit`. This is misleading, especially for new contributors. Since we have been "manually" discouraging people from using `aio`, there should be no open PRs by now (and if there are, they should be changed to `docs-infra`), so it is safe to remove it from the list of allowed scopes. Related discussion: #32273 (review) [1]: https://github.com/angular/angular/blob/3df54be9e/tools/validate-commit-message/commit-message.json#L16 PR Close #32341
The `aio` commit message scope was renamed to `docs-infra` (which is more descriptive) in #24295. Although it has been removed from the documentation, the legacy `aio` scope was kept in the [list of valid scopes][1] to cater for in-flight PRs that already used it. As a result, it still shows up as a recommended, valid scope in the error message shown when commit message validation fails during `git commit`. This is misleading, especially for new contributors. Since we have been "manually" discouraging people from using `aio`, there should be no open PRs by now (and if there are, they should be changed to `docs-infra`), so it is safe to remove it from the list of allowed scopes. Related discussion: #32273 (review) [1]: https://github.com/angular/angular/blob/3df54be9e/tools/validate-commit-message/commit-message.json#L16 PR Close #32341
The `aio` commit message scope was renamed to `docs-infra` (which is more descriptive) in angular#24295. Although it has been removed from the documentation, the legacy `aio` scope was kept in the [list of valid scopes][1] to cater for in-flight PRs that already used it. As a result, it still shows up as a recommended, valid scope in the error message shown when commit message validation fails during `git commit`. This is misleading, especially for new contributors. Since we have been "manually" discouraging people from using `aio`, there should be no open PRs by now (and if there are, they should be changed to `docs-infra`), so it is safe to remove it from the list of allowed scopes. Related discussion: angular#32273 (review) [1]: https://github.com/angular/angular/blob/3df54be9e/tools/validate-commit-message/commit-message.json#L16 PR Close angular#32341
… guide (angular#32273) Call data services inside ngOnInit interface implementation of components. closes angular#32048 PR Close angular#32273
|
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. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #32048
What is the new behavior?
Data services are queried inside
ngOnInitinterface implementation of componentsDoes this PR introduce a breaking change?
Other information
@kapunahelewong