fix(ivy): deps are actually supported (#28076)

This code was throwing if the `deps` array of a provider has several elements, but at the next line it resolves them... With this check `ngtsc` couldn’t compile `ng-bootstrap` for example.

PR Close #28076
This commit is contained in:
cexbrayat
2019-01-11 14:50:26 +01:00
committed by Andrew Kushnir
parent 9460218f36
commit 6072ca87e1
2 changed files with 169 additions and 4 deletions

View File

@ -109,9 +109,6 @@ function extractInjectableMetadata(
ErrorCode.VALUE_NOT_LITERAL, depsExpr,
`In Ivy, deps metadata must be an inline array.`);
}
if (depsExpr.elements.length > 0) {
throw new Error(`deps not yet supported`);
}
userDeps = depsExpr.elements.map(dep => getDep(dep, reflector));
}