JSFiddle - React, Tailwind, and code Playground
by paulocoelho
HTML
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<div ng-app="testApp" ng-controller="myC">
<p ng-repeat="t in ta" on-finish-render="test">{{t}}</p>
</div>
JavaScript
var module = angular.module('testApp', [])
.directive('onFinishRender', function ($timeout) {
return {
restrict: 'A',
link: function (scope, element, attr) {
if (scope.$last === true) {
$timeout(function () {
scope.$emit(attr.onFinishRender);
});
}
}
}
});
function myC($scope) {
$scope.ta = [1, 2, 3, 4, 5, 6];
$scope.$on('test', function(ngRepeatFinishedEvent) {
console.log($("p"));
console.log("done");
});
}