JSFiddle - React, Tailwind, and code Playground

by denisonluz

HTML

<div ng-app="app" ng-controller="MainCtrl">
    <input name="data.country" ng-model="data.country"><br />
    <span>{{data.country}}</span><br />
    <button ng-click="set('Italy')">set to Italy</button>
        
</div>

JavaScript

angular.module('app', [])
    .controller('MainCtrl', function($scope) {
        $scope.data = {country: 'Brazil'};
        
        $scope.set = function(new_title) {
            this.data.country = new_title;
        }
    });