我正在尝试将ng-repeat中的值传递给组件,但我无法确定如何在ng-click中传递值。
<span md-prevent-menu-close md-toggle height="100px">Selecteer status</span>
<ul class="md-toggle">
<li md-prevent-menu-close ng-repeat="x in vm.telephonyInfo.phone.phoneRichPresenceStateOptions" ng-click="vm.currentPhoneRichPresenceState = {{x.text}}; vm.setPhoneRichPresenceState();" >{{x.text}}</li>
</ul>
如果我使用:
ng-click="vm.currentPhoneRichPresenceState = 'asd';
然后它有效,但是:
ng-click="vm.currentPhoneRichPresenceState = '{{x.text}}';
呈现为字符串。