JSFiddle - React, Tailwind, and code Playground

by gkohen

HTML

<head>
    <script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.js"></script>

    
</head>
<body ng-app='testApp'>
 <div id="content">
	<div style="padding:50px">
	  <div data-ng-controller="SomeController">
		  <p align="center">Something</p>
		  <div id="some-panel"></div>
		  <div id="some-canvas">{{dirPanelElementText}}</div>	
	  </div>
    </div>
 </div>
</body>

	

    
	
	
	
    
</body>

JavaScript

(function() {
    var testApp = angular.module("testApp", []);
    function SomeController($scope) {
        console.log('Started controller');
		
		$scope.dirPanelElement = angular.element('#some-panel');
           $scope.dirPanelElement.text('set test');
        $scope.dirPanelElementText='got "'+$scope.dirPanelElement.text()+'" from panel'
			
    }

    testApp.controller("SomeController", SomeController);
})(); // declare new function and then invoking it