Angular 5 属性指令将 mat-ripple 添加到宿主元素 [英] Angular 5 attribute directive add mat-ripple to host element

查看:20
本文介绍了Angular 5 属性指令将 mat-ripple 添加到宿主元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将 mat-ripple 指令添加到我创建的自定义指令的宿主元素?关键是让 mat-ripple 自动添加到我添加了 my-custom-directive 的任何元素中.

How can I add the mat-ripple directive to the host element of a custom directive I've created? The point is to have mat-ripple automagically added to any element I add my-custom-directive too.

因此,如果我将 添加到模板中,它应该呈现为

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆