JSFiddle - React, Tailwind, and code Playground
by BoxMan0617
HTML
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js"></script>
<div class="myApp" ng-app="myApp">
<div ng-controller="TestController as testCtrl">
<div test-directive test="hahahahaha">
hey!
{{blah.hello}}
{{blah | json}}
</div>
</div>
</div>
JavaScript
(function(angular) {
var app = angular.module('myApp', []);
app.controller('TestController', ['$scope', TestController]);
function TestController($scope) {
$scope.test = 'hello';
}
app.directive('testDirective', [TestDirective]);
function TestDirective() {
return {
scope: {test: '='},
controller: BlahController,
controllerAs: 'blah'
};
}
BlahController.$inject = ['$scope'];
function BlahController($scope) {
var vm = this;
vm.hello = 'hi!';
}
})(angular);