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.

$interpolate 'allOrNothing' ignores empty case #15133

Closed
@amitport

Description

@amitport

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

What is the current behavior?
$interpolate service when running with allOrNothing, does not pass the value if there's nothing to interpolate (this affects ngAtrr*, which does not write the corresponding attribute when it has a simple value)

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (template: http://plnkr.co/edit/tpl:yBpEi4).
http://plnkr.co/edit/1QhnA9xb5BgyzWHpeL7O?p=preview

What is the expected behavior?
should see the poster image on video...

What is the motivation / use case for changing the behavior?
Although there is no real need for using ngAttr/ngSrc/ngHref without interpolation, it's sometimes useful to do so when exploring initial html template or learning angular. Having to use ng-attr-*="{{'value'}}" instead of ng-attr-*="value" is not intuitive.

Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
angular 1.5.8
win 7
chrome 53, IE 11, firefox 47

Other information (e.g. stacktraces, related issues, suggestions how to fix)
following #15130 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions