(viewValue)
| 22700 | var separator = trimValues ? trim(ngList) : ngList; |
| 22701 | |
| 22702 | var parse = function(viewValue) { |
| 22703 | // If the viewValue is invalid (say required but empty) it will be `undefined` |
| 22704 | if (isUndefined(viewValue)) return; |
| 22705 | |
| 22706 | var list = []; |
| 22707 | |
| 22708 | if (viewValue) { |
| 22709 | forEach(viewValue.split(separator), function(value) { |
| 22710 | if (value) list.push(trimValues ? trim(value) : value); |
| 22711 | }); |
| 22712 | } |
| 22713 | |
| 22714 | return list; |
| 22715 | }; |
| 22716 | |
| 22717 | ctrl.$parsers.push(parse); |
| 22718 | ctrl.$formatters.push(function(value) { |
no test coverage detected