logo
  • 教程列表
  • SO官方文檔
  • AngularJS 繫結選項
    • 單向繫結屬性繫結
    • 雙向繫結
    • 功能繫結表示式繫結
    • 可通過簡單樣本進行繫結
    • 繫結可選屬性
  1. StackOverflow 文件
  2. AngularJS 教程
  3. AngularJS 繫結選項
  4. 繫結可選屬性

繫結可選屬性

Created: November-22, 2018

bindings: {
   mandatory: '=' 
   optional: '=?',
   foo: '=?bar'
}

可選屬性應標有問號:=? 或 =?bar。它是對 ($compile:nonassign) 異常的保護。

  • 可通過簡單樣本進行繫結

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明