Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$onChanges isn't called on the initialization of the component #14318

@thorn0

Description

@thorn0

Do you want to request a feature or report a bug?

Feature (I guess)

What is the current behavior?

$onChanges isn't called on the initialization of the component.

What is the motivation / use case for changing the behavior?

The motivation is to match the behavior of Angular 2. In A2, ngOnChanges is called on the initialization of the component too. And the change object includes the isFirstChange method, which in this case returns true.

Other information (e.g. stacktraces, related issues, suggestions how to fix)

A plunk that shows how ngOnChanges works in Angular 2: http://plnkr.co/edit/kIf8QgrFxtENzvr6V5TZ?p=preview

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions