Skip to content

Commit

Permalink
Merge pull request #8 from OscarF/master
Browse files Browse the repository at this point in the history
Add boValue.
  • Loading branch information
Pasvaz committed Jul 11, 2013
2 parents 7c3b0b9 + acfe03a commit 25d69ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ when used with `ng-repeat` `bindonce` doesn't need to check if `person` is defin
| `bo-title = "text"` | evaluates "text" and render it as `title` for the element |`<img bo-src="picture" bo-title="title">`|
| `bo-id = "text"` | evaluates "text" and render it as `id` for the element |`<img bo-src="picture" bo-id="id">`|
| `bo-style = "text"` | evaluates "text" and render it as `style` for the element |`<img bo-src="picture" bo-style="style">`|
| `bo-value = "text"` | evaluates "text" and render it as `value` for the element |`<input type="radio" bo-value="value">`|

## Todo
Examples and Tests
Expand Down
10 changes: 6 additions & 4 deletions bindonce.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
case 'title':
case 'id':
case 'style':
binder.element.attr(binder.attr, value);
case 'value':
binder.element.attr(binder.attr, value);
break;
}
}
Expand Down Expand Up @@ -150,9 +151,10 @@ angular.forEach({
'boAlt' : 'alt',
'boTitle' : 'title',
'boId' : 'id',
'boStyle' : 'style'
},
function(tag, attribute)
'boStyle' : 'style',
'boValue' : 'value'
},
function(tag, attribute)
{
var childPriority = 200;
return angular.module('pasvaz.bindonce').directive(attribute, function()
Expand Down

0 comments on commit 25d69ec

Please sign in to comment.