0
在component可以綁定的風格如bindonce?請舉一個例子。綁定屬性只有一次(如bindonce)
在component可以綁定的風格如bindonce?請舉一個例子。綁定屬性只有一次(如bindonce)
因爲角度有它使用V1.3以下語法bindonce
<div ng-repeat="item in ctrl.results">
<div>{{ ::item.name }} - {{ ::item.description }}</div>
</div>
<div ng-if="::vm.user.loggedIn"></div>
for class
ng-class="::{ loggedIn: vm.user.loggedIn }"
你是對的,這裏的文檔:https://docs.angularjs.org/guide/expression,部分「有一次結合」 。 – zatziky