嗨,我想添加两个字段,并放入另一个字段
<input type="text" ng-model="pfi.value1">
<input type="text" ng-model="pfi.value2">
<input type="text" ng-model="pfi.sum" >它在标签上工作正常
<label>{{ pfi.value1 + pfi.value2}}</label>但是如何在文本字段中做同样的事情呢
发布于 2016-03-31 01:20:47
您还应该在控制器pfi.sum = pfi.value1 + pfi.value2上执行此操作,您需要将控制器添加到html文件中。
https://stackoverflow.com/questions/36315472
复制相似问题