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

Commit 8eddf0b

Browse files
committed
fix(binding): correctly binds single property model when using child array
1 parent e14d024 commit 8eddf0b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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)