(viewValue)
| 17980 | separator = match && new RegExp(match[1]) || attr.ngList || ','; |
| 17981 | |
| 17982 | var parse = function(viewValue) { |
| 17983 | // If the viewValue is invalid (say required but empty) it will be `undefined` |
| 17984 | if (isUndefined(viewValue)) return; |
| 17985 | |
| 17986 | var list = []; |
| 17987 | |
| 17988 | if (viewValue) { |
| 17989 | forEach(viewValue.split(separator), function(value) { |
| 17990 | if (value) list.push(trim(value)); |
| 17991 | }); |
| 17992 | } |
| 17993 | |
| 17994 | return list; |
| 17995 | }; |
| 17996 | |
| 17997 | ctrl.$parsers.push(parse); |
| 17998 | ctrl.$formatters.push(function(value) { |
no test coverage detected