diff options
| author | Vojta Jina | 2012-04-04 08:12:39 -0700 |
|---|---|---|
| committer | Vojta Jina | 2012-04-04 08:26:28 -0700 |
| commit | dcb8e0767fbf0a7a55f3b0045fd01b2532ea5441 (patch) | |
| tree | 3726eac589962daf7036889cc5722310096d949d /src | |
| parent | 21b77ad5c231ab0e05eb89f22005f7ed8d40a6c1 (diff) | |
| download | angular.js-dcb8e0767fbf0a7a55f3b0045fd01b2532ea5441.tar.bz2 | |
fix(booleanAttrs): convert to boolean
jQuery's attr() does not handle 0 as false, when it comes to boolean attrs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/directive/booleanAttrDirs.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ng/directive/booleanAttrDirs.js b/src/ng/directive/booleanAttrDirs.js index 01134998..fee10ed8 100644 --- a/src/ng/directive/booleanAttrDirs.js +++ b/src/ng/directive/booleanAttrDirs.js @@ -288,7 +288,7 @@ forEach(BOOLEAN_ATTR, function(propName, attrName) { return function(scope, element, attr) { attr.$$observers[attrName] = []; scope.$watch(attr[normalized], function(value) { - attr.$set(attrName, value); + attr.$set(attrName, !!value); }); }; } |
