Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
Merge pull request #131 from angular-ui/fix-singlebinding
Browse files Browse the repository at this point in the history
Correctly bind single properties to child array
  • Loading branch information
dimirc committed Aug 1, 2014
2 parents e14d024 + e298c05 commit df2e931
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ui-select",
"version": "0.5.0",
"version": "0.5.1",
"homepage": "https://github.com/angular-ui/ui-select",
"authors": [
"AngularUI"
Expand Down
2 changes: 1 addition & 1 deletion dist/select.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.5.0 - 2014-07-30T04:47:33.136Z
* Version: 0.5.1 - 2014-08-01T01:09:37.152Z
* License: MIT
*/

Expand Down
7 changes: 3 additions & 4 deletions dist/select.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* ui-select
* http://github.com/angular-ui/ui-select
* Version: 0.5.0 - 2014-07-30T04:47:33.132Z
* Version: 0.5.1 - 2014-08-01T01:09:37.148Z
* License: MIT
*/

Expand Down Expand Up @@ -72,7 +72,7 @@

return {
itemName: match[2], // (lhs) Left-hand side,
source: match[3], // (rhs) Right-hand side,
source: $parse(match[3]),
trackByExp: match[4],
modelMapper: $parse(match[1] || match[2])
};
Expand Down Expand Up @@ -358,8 +358,7 @@

//From model --> view
ngModel.$formatters.unshift(function (inputValue) {
var match = $select.parserResult.source.match(/^\s*([\S]+).*$/);
var data = scope[match[1]];
var data = $select.parserResult.source(scope);
if (data){
for (var i = data.length - 1; i >= 0; i--) {
var locals = {};
Expand Down
2 changes: 1 addition & 1 deletion dist/select.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/select.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"repository": {
"url": "git://github.com/angular-ui/ui-select.git"
},
"version": "0.5.0",
"version": "0.5.1",
"devDependencies": {
"bower": "~1.3",
"del": "~0.1.1",
Expand Down
5 changes: 2 additions & 3 deletions src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

return {
itemName: match[2], // (lhs) Left-hand side,
source: match[3], // (rhs) Right-hand side,
source: $parse(match[3]),
trackByExp: match[4],
modelMapper: $parse(match[1] || match[2])
};
Expand Down Expand Up @@ -350,8 +350,7 @@

//From model --> view
ngModel.$formatters.unshift(function (inputValue) {
var match = $select.parserResult.source.match(/^\s*([\S]+).*$/);
var data = scope[match[1]];
var data = $select.parserResult.source(scope);
if (data){
for (var i = data.length - 1; i >= 0; i--) {
var locals = {};
Expand Down

0 comments on commit df2e931

Please sign in to comment.