We have an application where we use angular for a particular tab. So we needed to compile the ajax document.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}); |