angularjs 求两变量之和

时间:2017-06-01 11:48:37   收藏:0   阅读:357
<img src="https://angularjs.org/img/AngularJS-large.png" height="50px" weight="50px"/>

<h3>Sum of two Numbers using AngularJS</h3>

<div ng-app="">
     <h3>Using Double Negation</h3>

    <p>First Number:
        <input type="text" ng-model="a" />
    </p>
    <p>Second Number:
        <input type="text" ng-model="b" />
    </p>
    <p>Sum: {{ a -- b }}</p>
     <h3>Using Input Type Number</h3>

    <p>First Number:
        <input type="number" ng-model="c" />
    </p>
    <p>Second Number:
        <input type="number" ng-model="d" />
    </p>
    <p>Sum: {{ c + d }}</p>
</div>

  

原文:http://www.cnblogs.com/liucong7708/p/6928059.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!