(values)
| 14018 | |
| 14019 | if (!mustHaveExpression || expressions.length) { |
| 14020 | var compute = function(values) { |
| 14021 | for (var i = 0, ii = expressions.length; i < ii; i++) { |
| 14022 | if (allOrNothing && isUndefined(values[i])) return; |
| 14023 | concat[expressionPositions[i]] = values[i]; |
| 14024 | } |
| 14025 | |
| 14026 | if (contextAllowsConcatenation) { |
| 14027 | // If `singleExpression` then `concat[0]` might be a "trusted" value or `null`, rather than a string |
| 14028 | return $sce.getTrusted(trustedContext, singleExpression ? concat[0] : concat.join('')); |
| 14029 | } else if (trustedContext && concat.length > 1) { |
| 14030 | // This context does not allow more than one part, e.g. expr + string or exp + exp. |
| 14031 | $interpolateMinErr.throwNoconcat(text); |
| 14032 | } |
| 14033 | // In an unprivileged context or only one part: just concatenate and return. |
| 14034 | return concat.join(''); |
| 14035 | }; |
| 14036 | |
| 14037 | return extend(function interpolationFn(context) { |
| 14038 | var i = 0; |
no test coverage detected