JSFiddle - React, Tailwind, and code Playground

by RajamohanShilpa A

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.1/angular.min.js"></script>
<div ng-app="FetchApp">  
    <div ng-controller="FetchCtrl" >        
        <button ng-click="fetch()">fetch</button><br/>
        {{info}}
    </div>
</div>

JavaScript

(function(){
    angular.module("FetchApp",[]).controller("FetchCtrl",function($scope, $http) {
        $scope.URL = "https://api.github.com/users/mralexgray/repos";        
        $scope.fetch = function() {            
            $http.get($scope.URL).
            success(function(data) { 
            debugger;
            	$scope.info=data
            });
            
            /*
            or
            
            $http.get($scope.URL).then(function(data) {             							$scope.info=data       
            });*/
            
        };
    });
})();