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

fix($compile): handle boolean attributes in @ bindings #13769

Closed
wants to merge 1 commit into from

Conversation

petebacondarwin
Copy link
Member

Closes #13767

@petebacondarwin
Copy link
Member Author

To be backported to 1.4

@Narretz
Copy link
Contributor

Narretz commented Jan 14, 2016

Looks good. However, can you add a comment that explains why we have to do that? I'm not convinced it's angular that is modifying these boolean attributes. Isn't it the browser that converts the content of boolean attributes to "true"?

@petebacondarwin
Copy link
Member Author

Here is plunker that shows the problem is fixed by this PR: https://plnkr.co/edit/mk9BJODWJdYFhMpw3nGa?p=preview

@petebacondarwin
Copy link
Member Author

@Narretz here is the line where the boolean conversion happens I believe: https://github.com/angular/angular.js/blob/master/src/ng/directive/attrs.js#L339

@Narretz
Copy link
Contributor

Narretz commented Jan 14, 2016

You are right, thanks for the link. Can't hurt to put it in a little comment, though ;)

@petebacondarwin
Copy link
Member Author

Will do!

@Narretz Narretz force-pushed the master branch 2 times, most recently from 70049ae to b77e14b Compare January 16, 2016 21:59
petebacondarwin added a commit to petebacondarwin/angular.js that referenced this pull request Jan 20, 2016
petebacondarwin added a commit that referenced this pull request Jan 21, 2016
@petebacondarwin petebacondarwin deleted the issue-13767 branch November 24, 2016 09:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants