fix(ivy): ensure Ivy *Ref classes derive from view engine equivalents (#25775)

Various user code uses 'instanceof' to check whether a particular instance
is a TemplateRef, ElementRef, etc. Ivy needs to work with these checks.

PR Close #25775
This commit is contained in:
Alex Rickabaugh
2018-08-29 13:35:43 -07:00
committed by Igor Minar
parent 96d6b79ada
commit a9099e8f70
3 changed files with 16 additions and 9 deletions

View File

@ -804,7 +804,7 @@ describe('di', () => {
class DirectiveSameInstance {
value: boolean;
constructor(elementRef: ElementRef, directive: Directive) {
this.value = elementRef === directive.elementRef;
this.value = (elementRef === directive.elementRef) && elementRef instanceof ElementRef;
}
static ngDirectiveDef = defineDirective({
type: DirectiveSameInstance,