How to access the nativeElement of a Component in Angular4?

前端 未结 3 1702
星月不相逢
星月不相逢 2020-12-16 09:31

I have two components and one with attribute selector. The child component is,

import { Component, OnInit, Input, El         


        
3条回答
  •  不思量自难忘°
    2020-12-16 10:03

    In the first selector you have set '[app-bar-chart]' and it should be without square brachets. To pass the parent you should use:

     [chartContainer]="this"
    

    instead of:

     [chartContainer]="chartContainer"
    

提交回复
热议问题