angular.js - angularjs ng-model

【字号: 日期:2023-01-14浏览:23作者:雯心

问题描述

<p ng-if='info.times>0'>重新发送验证码(<span ng-model='info.times'>{{info.times}}</span>)</p>

为什么{{info.times}}数值一直是60不变呢,我打印的数值一直是减少的呀。(用console.log()打印了)

问题解答

回答1:

ng-model是加在表单元素上的,可以直接这样写<span>{{info.times}}</span>

回答2:

controller中的代码呢?

相关文章: