Skip to content

refactor: move angular2/lifecycle into angular2/core #4028

Closed

Description

@jeffbcross

3d38ec8 introduces a new module for angular2/lifecycle_hooks, but I think this should be exported from angular2/core since our current approach is for core to have all of the basic building blocks of an angular application.

Task:

  • Move modules/angular2/lifecycle_hooks.ts to modules/angular2/src/core/lifecycle_hooks.ts
  • Re-export all lifecycle_hooks exports from modules/angular2/core.ts

@vicb I landed a big PR for #3713 right after this merged in, which reduced the amount of import targets for angular2. Does this change make sense, or is there some use case I'm not thinking about?

Activity

  1. self-assigned this
    on Sep 7, 2015
  2. added this to the alpha-37 milestone on Sep 7, 2015
  3. vicb commented on Sep 8, 2015

    @vicb
    Contributor

    I've only moved the hooks in a separate file for doc purpose (ie to have all of them documented in one place and be able to link to the module from directives inline doc).

    If moving them to core still allows that, I'm +1

  4. tyleranton commented on Sep 17, 2015

    @tyleranton

    Is this already being worked on? I'd like to start contributing to this project.

  5. jeffbcross commented on Sep 17, 2015

    @jeffbcross
    ContributorAuthor

    @tyleranton please take it!

  6. tyleranton commented on Sep 17, 2015

    @tyleranton

    @jeffbcross awesome, will do!

  7. modified the milestones: alpha-38, alpha-37 on Sep 17, 2015
  8. tyleranton commented on Sep 18, 2015

    @tyleranton

    @jeffbcross There's an existing lifecycle folder in src/core

    Should it go in

    modules/angular2/src/core/lifecycle/lifecycle_hooks.ts

    instead of

    modules/angular2/src/core/lifecycle_hooks.ts

  9. jeffbcross commented on Sep 23, 2015

    @jeffbcross
    ContributorAuthor

    @tyleranton I would just move it into src/core.

  10. tyleranton commented on Sep 24, 2015

    @tyleranton

    @jeffbcross Cool, got it done. Last question.

    Re-export all lifecycle_hooks exports from modules/angular2/core.ts

    When re-exporting all lifecycle_hooks exports, should it be done like so:

    export {
      AfterContentInit,
      AfterContentChecked,
      AfterViewInit,
      AfterViewChecked,
      OnChanges,
      OnDestroy,
      OnInit,
      DoCheck
    } from 'modules/angular2/core';
    

    Or is there a way to specify exporting only lifecycle_hooks from angular2/core?

  11. 2 remaining items

  12. modified the milestones: alpha-39, alpha-38 on Oct 4, 2015
  13. modified the milestones: alpha-39, alpha-40, , alpha-41 on Oct 5, 2015
  14. mhevery commented on Oct 27, 2015

    @mhevery
    Contributor

    This should be in angular2/core/contracts per #4834

  15. vsavkin commented on Nov 24, 2015

    @vsavkin
    Contributor

    Fixed here 125fa38

  16. angular-automatic-lock-bot commented on Sep 7, 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.

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

Metadata

Metadata

Assignees

Labels

area: build & ciRelated the build and CI infrastructure of the projecteffort1: hoursrefactoringIssue that involves refactoring or code-cleanup

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions