JSFiddle - React, Tailwind, and code Playground

by dingen2010

HTML

<div ng-app>
    <div ng-controller="CTRL">
        <input type="text" ng-model="val1" />
        <input type="text" ng-model="val2" />
        <input type="text" value="{{val1 + val2}}" />
        <p>{{'Angular works!'}}</p>
        {{cost}}
    </div>
</div>

JavaScript

function CTRL ($scope) {
    $scope.val1 = 3;
    $scope.val2 = 4;
    
    $scope.cost = function() { return $scope.val1 + $scope.val2 };
}