JSFiddle - React, Tailwind, and code Playground

by Prashanth bhat

HTML

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

JavaScript

function MyCtrl($scope) {

    $scope.user={};
    $scope.showJson=function(){
        alert($scope.user)
    console.log($scope.user);
    }
    
    
}