(viewValue)
| 24301 | var separator = trimValues ? trim(ngList) : ngList; |
| 24302 | |
| 24303 | var parse = function(viewValue) { |
| 24304 | // If the viewValue is invalid (say required but empty) it will be `undefined` |
| 24305 | if (isUndefined(viewValue)) return; |
| 24306 | |
| 24307 | var list = []; |
| 24308 | |
| 24309 | if (viewValue) { |
| 24310 | forEach(viewValue.split(separator), function(value) { |
| 24311 | if (value) list.push(trimValues ? trim(value) : value); |
| 24312 | }); |
| 24313 | } |
| 24314 | |
| 24315 | return list; |
| 24316 | }; |
| 24317 | |
| 24318 | ctrl.$parsers.push(parse); |
| 24319 | ctrl.$formatters.push(function(value) { |
no test coverage detected