angularjs1中directive自定义组件,在父组件中用的时候,可以直接绑定ng-model,但需要

scope: {
    selectData: '=ngModel'//绑定父元素的ngmodel
},

在diretive中改变设置的selectData,则对应自定义组件中绑定的ng-model也会变化,自定义组件使用

angularjs js directive 组件与父组件ng-model传值

angularjs js directive 组件与父组件ng-model传值

相关文章:

  • 2021-04-13
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2021-06-08
  • 2022-02-26
  • 2021-07-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案