(viewValue)
| 21421 | var separator = trimValues ? trim(ngList) : ngList; |
| 21422 | |
| 21423 | var parse = function(viewValue) { |
| 21424 | // If the viewValue is invalid (say required but empty) it will be `undefined` |
| 21425 | if (isUndefined(viewValue)) return; |
| 21426 | |
| 21427 | var list = []; |
| 21428 | |
| 21429 | if (viewValue) { |
| 21430 | forEach(viewValue.split(separator), function(value) { |
| 21431 | if (value) list.push(trimValues ? trim(value) : value); |
| 21432 | }); |
| 21433 | } |
| 21434 | |
| 21435 | return list; |
| 21436 | }; |
| 21437 | |
| 21438 | ctrl.$parsers.push(parse); |
| 21439 | ctrl.$formatters.push(function(value) { |
no test coverage detected