Angular5:一个指令改变另一个指令的例子是什么?

Angular 5: What an example a directive change another directive?

我是 Angular 的新手。在 Angular 文档中,他们声明:

Attribute directives - change the appearance or behavior of an element, component, or another directive.

对于元素,组件来说是微不足道的,但是我不了解"another directive"(虽然我知道组件是指令,但是"real"指令呢)。谁能给我举一个关于这个陈述的例子?例如:

<div d1 d2> </div>

指令 d1 如何影响 d2 的行为?

这意味着指令可以一起应用并相互改变。

例如,在 this stackblitz 中,一个指令创建一个子项,另一个对其进行编辑。

您可以尝试一下,看看有什么可能。