JSFiddle - React, Tailwind, and code Playground

by pkozlowski_opensource

HTML

<div id="settingsholder"  ng-controller="MyCtrl">
      <input ng-model="user.firstName" />
      <input ng-model="user.lastName" />
      <input type="button" ng-click="showJson()" value="Object To JSON" />
        <hr/>  
        {{json}}
    </div>

JavaScript

function MyCtrl($scope) {

    $scope.user = {
        firstName: "Frank",
        lastName: "Williams"
    };

    $scope.showJson = function() {
        $scope.json = angular.toJson($scope.user);
    }
}