779344012a
This PR provides a more helpful error than the one currently present: `el.setAttribute is not a function`. It is not valid to have directives with host bindings on `ng-template` or `ng-container` nodes. VE would silently ignore this, while Ivy attempts to set the attribute and throws an error because these are comment nodes and do not have `setAttribute` functionality. It is better to throw a helpful error than to silently ignore this because putting a directive with host binding on an `ng-template` or `ng-container` is most often a mistake. Developers should be made aware that the host binding will have no effect in these cases. Note that an error is already thrown in Ivy, as mentioned above, so this is not a breaking change and can be merged to both master and patch. Resolves #35994 PR Close #37111 |
||
---|---|---|
.. | ||
global | ||
schematics | ||
src | ||
test | ||
testing | ||
BUILD.bazel | ||
PACKAGE.md | ||
index.ts | ||
package.json | ||
public_api.ts |