Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在Angular 4+;中的父级中定义的访问项;引导程序4_Javascript_Angular - Fatal编程技术网

Javascript 在Angular 4+;中的父级中定义的访问项;引导程序4

Javascript 在Angular 4+;中的父级中定义的访问项;引导程序4,javascript,angular,Javascript,Angular,我在父层中定义了一个模式窗口(作为名为#版权弹出窗口的ng模板),在子层中,我有一个链接,该链接应打开该模式窗口,如下所示: <a class="navbar-brand" href="#" (click)="open(window.opener.angular.element('#copyrightpopup'))"> <img src="assets/images/logo_name.png"> </a> 但单击链接会导致错误“无法读取未定义

我在父层中定义了一个模式窗口(作为名为#版权弹出窗口的ng模板),在子层中,我有一个链接,该链接应打开该模式窗口,如下所示:

<a class="navbar-brand" href="#" (click)="open(window.opener.angular.element('#copyrightpopup'))">
    <img src="assets/images/logo_name.png">
</a>

但单击链接会导致错误“无法读取未定义的属性开启器”

我正在通过剪切和粘贴示例来组装此代码,因此我怀疑我没有正确访问父级。我尝试过各种变体,但不知道如何通过父对象访问对象