คำถามติดแท็ก ready

10
การเรียกฟังก์ชันเมื่อ ng-repeat เสร็จสิ้น
สิ่งที่ฉันพยายามนำมาใช้นั้นเป็นตัวจัดการ "ในการทำซ้ำการเรนเดอร์เสร็จสิ้น" ฉันสามารถตรวจจับได้เมื่อเสร็จสิ้น แต่ฉันไม่สามารถหาวิธีที่จะเรียกใช้ฟังก์ชันจากมันได้ ตรวจสอบซอ: http://jsfiddle.net/paulocoelho/BsMqq/3/ JS var module = angular.module('testApp', []) .directive('onFinishRender', function () { return { restrict: 'A', link: function (scope, element, attr) { if (scope.$last === true) { element.ready(function () { console.log("calling:"+attr.onFinishRender); // CALL TEST HERE! }); } } } }); function myC($scope) { $scope.ta = [1, …
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.