Skip to content

Instantly share code, notes, and snippets.

@ashrafuzzaman
Last active December 15, 2015 00:49
Show Gist options
  • Save ashrafuzzaman/5175386 to your computer and use it in GitHub Desktop.
Save ashrafuzzaman/5175386 to your computer and use it in GitHub Desktop.
Compile angularJs
var $injector = angular.injector(['ng', 'custom_directives']);
var controllerDiv = $j(wrapper.find('div[ng-controller]')[0]);
$injector.invoke(function($rootScope, $compile, $document){
$compile(controllerDiv)($rootScope);
$rootScope.$digest();
});
@ashrafuzzaman
Copy link
Author

Compiling angularJs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment