JSFiddle - React, Tailwind, and code Playground
by ismett
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
<div ng-app>
<label>First number:</label>
<input type="number" ng-model="num1" /><br />
<label>Second number:</label>
<input type="number" ng-model="num2" />
<hr>
<h1>Sum: {{num1 + num2}}</h1>
<h1>Product: {{num1 * num2}}</h1>
</div>
JavaScript
angular.module('app').controller("MainController", function() {
this.num1 = 0;
this.num2 = 0;
this.sum = function() { return num1 + num2 };
this.product = function() { return num1 * num2 };
});