(node: Component)
| 879 | } |
| 880 | |
| 881 | private appendComponentNode(node: Component): void { |
| 882 | // TODO(crisbeto): should we still append the children if the component is invalid? |
| 883 | // Check that the referenced class exists. |
| 884 | if (!this.tcb.boundTarget.referencedDirectiveExists(node.componentName)) { |
| 885 | this.tcb.oobRecorder.missingNamedTemplateDependency(this.tcb.id, node); |
| 886 | return; |
| 887 | } |
| 888 | |
| 889 | // Check that the class is a component. |
| 890 | const directives = this.tcb.boundTarget.getDirectivesOfNode(node); |
| 891 | if ( |
| 892 | directives === null || |
| 893 | directives.length === 0 || |
| 894 | directives.every((dir) => !dir.isComponent || !dir.isStandalone) |
| 895 | ) { |
| 896 | this.tcb.oobRecorder.incorrectTemplateDependencyType(this.tcb.id, node); |
| 897 | return; |
| 898 | } |
| 899 | |
| 900 | const opIndex = this.opQueue.push(new TcbComponentNodeOp(this.tcb, this, node)) - 1; |
| 901 | this.componentNodeOpMap.set(node, opIndex); |
| 902 | if (this.tcb.env.config.controlFlowPreventingContentProjection !== 'suppress') { |
| 903 | this.appendContentProjectionCheckOp(node); |
| 904 | } |
| 905 | this.appendInputsOfSelectorlessNode(node); |
| 906 | this.appendOutputsOfSelectorlessNode(node); |
| 907 | this.appendSelectorlessDirectives(node); |
| 908 | this.appendChildren(node); |
| 909 | this.checkAndAppendReferencesOfNode(node); |
| 910 | } |
| 911 | |
| 912 | private appendDeferredBlock(block: DeferredBlock): void { |
| 913 | this.appendDeferredTriggers(block, block.triggers); |
no test coverage detected