Thanks to visit codestin.com
Credit goes to github.com

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.

ng-prop-* not working with "undefined" value #16797

Closed
@vargarobert

Description

@vargarobert

I'm submitting a ...

  • bug report
  • feature request
  • other

Current behavior:
"Undefined" is ignored when passed down through a ng-prop-* directive.

Let's take an example:
<my-component ng-prop-text="$ctrl.text"></my-component>

this.text = 'abc'
...text is set as abc and later on
this.text = undefined;
the value of the text in my-component remains unchanged to abc

Expected / new behavior:
The value of text should be cleared in the above example (ofc you could clear with empty string but that's not the point)
ng-prop-* should accept any JS type.

AngularJS version: 1.7.5
and snapshot 1.7.6

Browser: [all]

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