JSFiddle - React, Tailwind, and code Playground

by tetotechy

HTML

<div ng-app="b" id="app"></div>

JavaScript

angular.module('a', []).directive('foo', function($injector) {
    //var injector = $injector;     NB: not needed
});
angular.module('b', ['a']);

function logInjector() {
    var injector = angular.element(document.getElementById('app')).injector();
    console.log(injector);
}

logInjector();

setTimeout(logInjector, 0);