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

Function parse

test/angular/1.3/angular.js:22702–22715  ·  view source on GitHub ↗
(viewValue)

Source from the content-addressed store, hash-verified

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

Callers 1

$SceProviderFunction · 0.70

Calls 3

isUndefinedFunction · 0.70
forEachFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected