Skip to content

Data access from constructor in Getting Started guide #32048

Closed

Description

@bampakoa

📚 Docs or angular.io bug report

Description

I have noticed that ShippingComponent and CartComponent components access data from within the constructor and not using the recommended ngOnInit lifecycle event. Is this something that you are aware of (like keep it simple for the sake of a Getting started guide) or should it be fixed? In the latter case, I would be happy to submit a PR for that 😃

🔬 Minimal Reproduction

What's the affected URL?**

https://angular.io/start/data#define-the-shipping-page
https://angular.io/start/data#display-the-cart-items

Reproduction Steps**

Expected vs Actual Behavior**

📷Screenshot

🔥 Exception or Error





🌍 Your Environment

Browser info

Anything else relevant?

Activity

  1. added this to the needsTriage milestone on Aug 7, 2019
  2. modified the milestones: needsTriage, Backlog on Aug 13, 2019
  3. kapunahelewong commented on Aug 13, 2019

    @kapunahelewong
    Contributor

    You're absolutely right, @bampakoa! If you'd like to submit a PR that'd be great. I could help you through the review process and collaborate if you like.

    Doing it the way we should is simple enough that a newcomer should be able to follow.

  4. bampakoa commented on Aug 13, 2019

    @bampakoa
    ContributorAuthor

    @kapunahelewong thanks for your feedback. I would ❤️ to submit a PR 😃 . Should I follow the Angular Documentation Style Guide for this?

  5. kapunahelewong commented on Aug 14, 2019

    @kapunahelewong
    Contributor

    Yes, @bampakoa, the Angular Documentation Style Guide is what we use for angular.io specific style. When it comes to language use, the Google Developer Documentation Style Guide is our main resource. In case you haven't memorized either of those (yet! 🌟) I can help you on any of those kinds of style choices. Feel free to tag me here, in your PR, or reach out on twitter or gitter. Thanks a lot, this is great! 🌺

  6. added a commit that references this issue on Aug 27, 2019
    7033e7e
  7. added a commit that references this issue on Sep 6, 2019
    82aa290
  8. angular-automatic-lock-bot commented on Sep 27, 2019

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions