This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
$interpolate 'allOrNothing' ignores empty case #15133
Milestone
Comments
I think this is a valid problem, and it would be good to align this with normal attribute handling (which allows static values for obvious reasons). |
I don't think this has anything to do with |
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Sep 16, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). Fixes angular#15133
3 tasks
I submitted a possible fix in #15149. |
gkalpak
added a commit
that referenced
this issue
Sep 25, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes #15133 Closes #15149
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this issue
Nov 21, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes angular#15133 Closes angular#15149
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this issue
Nov 21, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes angular#15133 Closes angular#15149
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this issue
Nov 21, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes angular#15133 Closes angular#15149
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this issue
Nov 21, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes angular#15133 Closes angular#15149
petebacondarwin
pushed a commit
to petebacondarwin/angular.js
that referenced
this issue
Nov 21, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes angular#15133 Closes angular#15149
petebacondarwin
pushed a commit
that referenced
this issue
Nov 23, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes #15133 Closes #15149
petebacondarwin
pushed a commit
that referenced
this issue
Nov 24, 2016
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes #15133 Closes #15149
ellimist
pushed a commit
to ellimist/angular.js
that referenced
this issue
Mar 15, 2017
…rpolation Previoulsy, when the value of an `ngAttrXyz` attribute did not contain any interpolation, then the `xyz` attribute was never set. BTW, this commit adds a negligible overhead (since we have to set up a one-time watcher for example), but it is justifiable for someone that is using `ngAttrXyz` (instead of `xyz` directly). (There is also some irrelevant refactoring to remove unnecessary dependencies from tests.) Fixes angular#15133 Closes angular#15149
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Do you want to request a feature or report a bug?
bug
What is the current behavior?
$interpolate
service when running withallOrNothing
, 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 ofng-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)
The text was updated successfully, but these errors were encountered: