Javascript html:28错误类型错误:无法读取属性';推动';未定义的

Javascript html:28错误类型错误:无法读取属性';推动';未定义的,javascript,angular,push,Javascript,Angular,Push,如何使用推入式脚本角度6如何使用推入式脚本角度6如何使用推入式脚本角度6如何使用推入式脚本角度6如何使用推入式脚本角度6 This error is shown while searching for product, How to use push “Child.html:28错误类型错误:无法读取未定义的属性'push'” Hello Iam子标题 搜寻 {{msg}} {{msg1}} 产品 高级专员:没有。 产品Id 品名 产品价格 {{i+1}} {{product.pid} {

如何使用推入式脚本角度6如何使用推入式脚本角度6如何使用推入式脚本角度6如何使用推入式脚本角度6如何使用推入式脚本角度6

This error is shown while searching for product, How to use push 
“Child.html:28错误类型错误:无法读取未定义的属性'push'”

Hello Iam子标题
搜寻
{{msg}}
{{msg1}}

产品 高级专员:没有。 产品Id 品名 产品价格 {{i+1}} {{product.pid} {{product.pname} {{product.price}} 从“@angular/core”导入{Component,Input}”; 从“@angular/forms”导入{NgModel}”; //从“./directive\u demo/for\u demo/productlist.component”导入{productlist}; @组成部分({ 选择器:“应用程序子项”, templateUrl:“./child.component.html”, 样式URL:[“/child.component.css”] }) 导出类子类{ //@Input()rcname:string; //@Input()raddress:string; msg:string; msg1:字符串; //筛选器_prod=[]; 过滤器产品:任何[]; @Input()rpname:string; 搜索(){ 对于(var i=0;i
如何使用推入式打字脚本6 如何使用推入式打字脚本6
如何使用push-in typescript angular 6

您的代码中的注释是正确的:

This error is shown while searching for product, How to use push 
filter_prod:any[] = [];