You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Bug (with workaround). Though I couldn't find any info on this behavior on the internet and it seems like it'd be an important "gotcha" for a lot of people that should really be documented somewhere.
What is the current behavior?
Using <button type="{{someInterpolatedThing}}"> doesn't seem to play nicely with IE11 (didn't test past versions). It sets the type to submit regardless of what the interpolated value comes out to.
Steps to reproduce and if possible a minimal demo of the problem
Workaround: Using ng-attr-type="{{someInterpolatedThing}}" fixes it. I guess if this is the only way to workaround it, it might be useful having this as an additional example in the ngAttr docs since the canonical one there right now is <circle cx> which makes it seem like it might be primarily for svg.
What is the expected behavior?
IE11 interpolates the value and sets the type of the button
What is the motivation / use case for changing the behavior?
Cross-browser consistency (if possible) or at least let people know about it in the docs (if not possible)
Which version of Angular, and which browser and OS does this issue affect? Did this work in previous
versions of Angular? Please also test with the latest stable ánd snapshot versions.
1.5.0 on IE11
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)
The text was updated successfully, but these errors were encountered:
I verify that this happens on IE11. I don't think Angular can do much, because IE11 sets the value for the type attribute to submit, before Angular has a chance to access the interpolated expression. So Angular never sees type="{{ someExpression }}", it just sees type="submit".
So, pointing it out in the docs is the only thing we can do. We should add it here, were the similar issue with style is mentioned.
Bug (with workaround). Though I couldn't find any info on this behavior on the internet and it seems like it'd be an important "gotcha" for a lot of people that should really be documented somewhere.
Using
<button type="{{someInterpolatedThing}}">
doesn't seem to play nicely with IE11 (didn't test past versions). It sets the type tosubmit
regardless of what the interpolated value comes out to.Here's a pen showing the behavior. Open in Chrome, you get button type of
button
. Open in IE11, you get button type ofsubmit
.Workaround: Using
ng-attr-type="{{someInterpolatedThing}}"
fixes it. I guess if this is the only way to workaround it, it might be useful having this as an additional example in the ngAttr docs since the canonical one there right now is<circle cx>
which makes it seem like it might be primarily for svg.IE11 interpolates the value and sets the type of the button
Cross-browser consistency (if possible) or at least let people know about it in the docs (if not possible)
versions of Angular? Please also test with the latest stable ánd snapshot versions.
1.5.0 on IE11
The text was updated successfully, but these errors were encountered: