Angularjs 指令、隔离作用域、继承

Angularjs 指令、隔离作用域、继承,angularjs,angularjs-directive,angularjs-scope,Angularjs,Angularjs Directive,Angularjs Scope,我完全被这些话题弄糊涂了,真的需要一只手来生存。非常感谢 <xxx:layout style="height: 100px; width: 100%" xxx-horizontal> <xxx:layout style="width: 150px; background: yellow">I need to know my parent's orientation (should be horizontal:{{orientation}})</xxx:lay

我完全被这些话题弄糊涂了,真的需要一只手来生存。非常感谢

<xxx:layout style="height: 100px; width: 100%" xxx-horizontal>
    <xxx:layout style="width: 150px; background: yellow">I need to know my parent's orientation (should be horizontal:{{orientation}})</xxx:layout>
    <xxx:layout style="width: 450px; background: green">I need to know my parent's orientation (should be horizontal:{{orientation}})</xxx:layout>
    <xxx:layout style="width: 200px" xxx-vertical>
        <xxx:layout style="background: red; height: 50%">I need to know my parent's orientation (should be vertical:{{orientation}})</xxx:layout>
        <xxx:layout style="background: cyan; height: 50%">I need to know my parent's orientation (should be vertical:{{orientation}})</xxx:layout>
    </xxx:layout>
</xxx:layout>

我需要知道我父母的方向(应该是水平的:{{orientation}})
我需要知道我父母的方向(应该是水平的:{{orientation}})
我需要知道我父母的方向(应该是垂直的:{{orientation}})
我需要知道我父母的方向(应该是垂直的:{{orientation}})

简单地说,我需要知道子函数链接中父函数的属性(由xxx垂直或xxx水平A指令管理)。这描述了当前的“成功”。

这是您想要的,但是它没有使用布局指令,我不知道您是否真的需要它,因为我不知道您的指令的目的,但是当您有其他指令时,您不应该使用transclude


我接受了你的回答,因为我得到了我想要的;)事实上,这不是我真正需要的。我试图实现一种“拆分系统”,但在我看来,我选择了错误的方法,尤其是因为transclude。