MCPcopy Index your code
hub / github.com/angular-ui/ui-router / parse

Function parse

test/angular/1.2/angular.js:18233–18246  ·  view source on GitHub ↗
(viewValue)

Source from the content-addressed store, hash-verified

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) {

Callers 1

$SceProviderFunction · 0.70

Calls 3

isUndefinedFunction · 0.70
forEachFunction · 0.70
trimFunction · 0.50

Tested by

no test coverage detected