How do you call closePanel in angular 4 autoComplete material

前端 未结 1 776
误落风尘
误落风尘 2021-02-07 11:07
import { MdAutocomplete } from \'@angular/material\';

@Component({
 template:\'
             
             

        
1条回答
  •  爱一瞬间的悲伤
    2021-02-07 11:42

    Angular reads ElementRef by default from html element if you don't specify read option.

    So

    template

    
    

    component

    @ViewChild('autoCompleteInput', { read: MatAutocompleteTrigger }) 
    autoComplete: MatAutocompleteTrigger;
    

    Here is the Plunker Example that demonstrates this approach.

    0 讨论(0)
提交回复
热议问题