JSFiddle - React, Tailwind, and code Playground

by mkbharti

HTML

<div ng-app='MyModule' ng-controller="MyController" id="MyController">
    Hi
</div>

JavaScript

angular.module('MyModule', [])
.controller('MyController', function( $scope ) {
     $scope.myfunction = function(data) {
       alert("---" + data);
     };
});

angular.element(document.getElementById('MyController')).scope().myfunction('test');