Skip to content

Change detection needs to fire a allViewChangesDone callback #3319

Closed

Description

@rkirov

This would be similar to 'allChangesDone' but it will include any change detectors in the view tree.

It is needed for ViewQuery to fire its onChange callback guaranteeing it has all the directives that might have materialized in this CD turn. See failing test - rkirov@e543bab

Activity

  1. mhevery commented on Aug 20, 2015

    @mhevery
    Contributor

    I am confused, Are you suggesting that for Query to work it needs to wait for global CD to finish? That does not seem right. Can we chat about this?

  2. rkirov commented on Aug 20, 2015

    @rkirov
    ContributorAuthor

    The name is unfortunate, I am not proposing anything global.

    Imagine the following tree of injectors/nodes.

    injQ ---- (component view) -- 
     - inj1                       | -- inj3
     - inj2                       | -- inj4
    

    onChange is called when after we dirty-check the bindings on injQ.
    onAllChangesDone is called after we dirty-check inj1 and inj2 (but before we dirty check inj3 and inj4).
    We need a callback local to injQ to be called after we dirty-check all bindings in inj1, inj2 and the whole component view tree (inj3 and inj4).

    The callback is still local to injQ, and not global.

  3. mhevery commented on Aug 21, 2015

    @mhevery
    Contributor

    I see, makes sense.

  4. mhevery commented on Aug 21, 2015

    @mhevery
    Contributor

    clearing assignee since no milestone.

  5. rkirov commented on Sep 4, 2015

    @rkirov
    ContributorAuthor

    fixed in 5ebeaf7

  6. 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.

  7. 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

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions