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

Commit df2e931

Browse files
committed
Merge pull request #131 from angular-ui/fix-singlebinding
Correctly bind single properties to child array
2 parents e14d024 + e298c05 commit df2e931

File tree

7 files changed

+11
-13
lines changed

7 files changed

+11
-13
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ui-select",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"homepage": "https://github.com/angular-ui/ui-select",
55
"authors": [
66
"AngularUI"

dist/select.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.5.0 - 2014-07-30T04:47:33.136Z
4+
* Version: 0.5.1 - 2014-08-01T01:09:37.152Z
55
* License: MIT
66
*/
77

dist/select.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* ui-select
33
* http://github.com/angular-ui/ui-select
4-
* Version: 0.5.0 - 2014-07-30T04:47:33.132Z
4+
* Version: 0.5.1 - 2014-08-01T01:09:37.148Z
55
* License: MIT
66
*/
77

@@ -72,7 +72,7 @@
7272

7373
return {
7474
itemName: match[2], // (lhs) Left-hand side,
75-
source: match[3], // (rhs) Right-hand side,
75+
source: $parse(match[3]),
7676
trackByExp: match[4],
7777
modelMapper: $parse(match[1] || match[2])
7878
};
@@ -358,8 +358,7 @@
358358

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

dist/select.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/select.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"repository": {
66
"url": "git://github.com/angular-ui/ui-select.git"
77
},
8-
"version": "0.5.0",
8+
"version": "0.5.1",
99
"devDependencies": {
1010
"bower": "~1.3",
1111
"del": "~0.1.1",

src/select.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
return {
6666
itemName: match[2], // (lhs) Left-hand side,
67-
source: match[3], // (rhs) Right-hand side,
67+
source: $parse(match[3]),
6868
trackByExp: match[4],
6969
modelMapper: $parse(match[1] || match[2])
7070
};
@@ -350,8 +350,7 @@
350350

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

0 commit comments

Comments
 (0)