angular-material - 关注 ng-template 中的元素
问题描述
我使用 ng-template 创建了一个自定义面板,该面板应通过单击按钮打开。我还想支持键盘导航。问题是,当我在关注按钮时单击 enter 时,焦点不会传递给 ng-template 中的元素,它传递给按钮的下一个兄弟。我在这里创建了一个示例,我假设当显示 ng-tempalte 时我需要专注于选择控件,问题是它返回未定义。
解决方案
推荐阅读
- javascript - 如何使用 telnet 在 javascript 中调用变量
- javascript - 在迭代中创建函数
- php - php将多个动态输入数据插入数据库
- javascript - 如何将数据从 Electron 传递到 HTML
- android - 如何将扫描的二维码图像保存在颤振中?
- python-3.x - 关于从堆栈中删除中间元素时递归堆栈的问题
- reactjs - 盖茨比蛞蝓断了
- javascript - 为什么'for'循环只返回数组中的最后一项?
- php - 未捕获的错误:在 php 中调用 null 上的成员函数 connection()
- reactjs - React 应用程序在本地运行良好,但在 Heroku 上部署后失败