search

Home  >  Q&A  >  body text

angular.js - angularjs directive 中 scope '=?' 表达的是什么意思?

angularjs directive 中 scope '=?' 表达的是什么意思?

天蓬老师天蓬老师2744 days ago616

reply all(2)I'll reply

  • 滿天的星座

    滿天的星座2017-05-15 16:55:25

    If the parent scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You can avoid this behavior using =? or =?attr in order to flag the property as optional.


    If you want to shallow watch for changes (i.e. $watchCollection instead of $watch) you can use =* or =*attr (=*? or =*?attr if the property is optional).

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-15 16:55:25

    For two-way data binding, you can check out the portal here

    reply
    0
  • Cancelreply