Isolated scope with simple angularjs nested directive

后端 未结 2 1100
情深已故
情深已故 2021-01-30 04:51

Please check this plnkr

I have read everyhting can find about directives, scope and isolated scopes. But I still cannot understand the way to make this work.

Th

2条回答
  •  清酒与你
    2021-01-30 05:16

    Never fails. Hours of googling turns up nothing until I actually type the question then I get the combination of search keywords and voila! the answer appears.

    Thanks to this very illuminating post I learned that my problem is so common the solution even has a name - "The dot rule".

    Basically you need to refer to an inherited object on the controller rather than a property and the problem goes away.

提交回复
热议问题