且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

AngularJS自定义指令双向绑定

更新时间:2021-08-20 02:46:22

为什么是一个孤立的范围矫枉过正?其pretty了整整这种事情有用:

Why is an isolate scope overkill? its pretty useful for exactly this kind of thing:

  scope: {
     "twoway": "=" // two way binding
  },

这是一个pretty惯用的角度解决这个问题,所以这是我会坚持使用。

This is a pretty idiomatic angular solution to this problem, so this is what I'd stick with.