JSFiddle - React, Tailwind, and code Playground

by yonet3d

HTML

<body ng-app="scopeExample">
  <div ng-controller="MyController">
  Your name:
    <input type="text" ng-model="username">
    <button ng-click='sayHello()'>greet</button>
  <hr>
  {{greeting}}
</div>
</body>

JavaScript

//Defines our app
var app = angular.module('scopeExample', []);

//defines first controller
app.controller('MyController', function($scope) {
    $scope.username = 'World';

    $scope.sayHello = function() {
    $scope.greeting = 'Hello ' + 	$scope.username + '!';
    };
  });