fix(ivy): injecting optional TemplateRef on element should not throw (#26664)

PR Close #26664
This commit is contained in:
Kara Erickson
2018-10-25 11:18:49 -07:00
committed by Matias Niemelä
parent d2e6d6978e
commit d52d82d744
4 changed files with 79 additions and 25 deletions

View File

@ -55,7 +55,7 @@ export abstract class TemplateRef<C> {
/** @internal */
static __NG_ELEMENT_ID__:
() => TemplateRef<any> = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef)
() => TemplateRef<any>| null = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef)
}
export const SWITCH_TEMPLATE_REF_FACTORY__POST_R3__ = render3InjectTemplateRef;