(viewValue)
| 18231 | separator = match && new RegExp(match[1]) || attr.ngList || ','; |
| 18232 | |
| 18233 | var parse = function(viewValue) { |
| 18234 | // If the viewValue is invalid (say required but empty) it will be `undefined` |
| 18235 | if (isUndefined(viewValue)) return; |
| 18236 | |
| 18237 | var list = []; |
| 18238 | |
| 18239 | if (viewValue) { |
| 18240 | forEach(viewValue.split(separator), function(value) { |
| 18241 | if (value) list.push(trim(value)); |
| 18242 | }); |
| 18243 | } |
| 18244 | |
| 18245 | return list; |
| 18246 | }; |
| 18247 | |
| 18248 | ctrl.$parsers.push(parse); |
| 18249 | ctrl.$formatters.push(function(value) { |
no test coverage detected