Skip to content

Wrong component destroying order #163

Closed
@i23591326

Description

@i23591326

I have a nested route chain /object/object123/controller/controller456/contrdeviceparam

when i navigate
/object/object123/controller/controller456/contrdeviceparam => /object/object123/controller/controller456
contrdeviceparam's component being destroyed and it triggers $onDestroy event whitch triggers component's onDestroyCallback "&" binding that is processed outside in corresponding router's resolve.

However, when i go
/object/object123/controller/controller456/contrdeviceparam => /object/object123
three components is being destroyed, but order of callbacks is:
controller=>controller456=>contrdeviceparam instead of opposite, i.e. parent component being destroyed earlier then it's child (???), and it breaks internal logic.

By the way i checked router's onEnter/onExit events and they are fires properly (contrdeviceparam =>controller456=>controller), but I had to abandon the use of this approach
because of the too long gap between onExit and onEnter

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions