AngularJS: Parent scope is not updated in directive (with isolated scope) two way binding

前端 未结 5 801
没有蜡笔的小新
没有蜡笔的小新 2020-12-08 20:09

I have a directive with isolated scope with a value with two way binding to the parent scope. I am calling a method that changes the value in the parent scope, but the chang

5条回答
  •  醉话见心
    2020-12-08 20:32

    One thing most people forget is that you can't just declare an isolated scope with the object notation and expect parent scope properties to be bound. These bindings only work if attributes have been declared through which the binding 'magic' works. See for more information:

    https://umur.io/angularjs-directives-using-isolated-scope-with-attributes/

提交回复
热议问题