fix(ivy): directives without selector should not be supported (#28021)

PR Close #28021
This commit is contained in:
Marc Laval
2019-01-09 17:55:23 +01:00
committed by Andrew Kushnir
parent 7374dfd1fa
commit 76ed13bffe
4 changed files with 55 additions and 32 deletions

View File

@ -165,6 +165,9 @@ export function extractDirectiveMetadata(
}
selector = resolved;
}
if (!selector) {
throw new Error(`Directive ${clazz.name !.text} has no selector, please add it!`);
}
const host = extractHostBindings(directive, decoratedElements, evaluator, coreModule);