简体   繁体   English

AngularJs指令隔离范围无法唤醒

[英]AngularJs directive isolated scope not woking

I'm learning angularJs and reading ng-book. 我正在学习angularJs和阅读ng-book。

I was trying out the examples related the isolated scope in directives. 我正在尝试与指令中隔离范围相关的示例。 In the book it has example published in JS Bin , which uses angular 1.2.0-rc.3 and it works fine. 在书中,它有在JS Bin中发布的示例,该示例使用angular 1.2.0-rc.3,并且运行良好。 But when I tried the same example with version 1.3.0-beta.13 it doesn't work. 但是,当我使用1.3.0-beta.13版本尝试相同的示例时,它不起作用。 I can see the parent value inside the directive with isolated scope. 我可以在具有隔离范围的指令中看到父值。 You can see the code here 你可以在这里看到代码

Can someone guide me on how to get isolated scope working in angular 1.3.0-beta.13. 有人可以指导我如何在1.3.0-beta.13中使用隔离式示波器。

You should set directive's template property to assign it's html or use transclude if you want to use directive-caller's element inner html bindings. 如果要使用伪指令调用者的元素内部html绑定,则应设置伪指令的template属性以为其分配html或使用transclude See 看到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM