I have a part of code, like this:
<div class="wrapper-directive">
<div class="table" style="display:table">
<div class="column" style="display:table-cell;" ng-repeat="column in columns">
{{column.text}}</div>
</div>
</div>
How can I get width of repeated "column" elements from "wrapperDirective"? As I understood, I need something like onDomRepeatComplete event, but at this moment I still can't find correct solution and syntax and using just setTimeout pause ...
$last can be used to determine when the last <div> is being created. See this fiddle (I didn't write it) for an implementation of a checkLast directive that you can attach to your <div> element:
directive('checkLast', function () {
return function (scope, element, attrs) {
if (scope.$last === true) {
element.ready(function () {
// determine width here using jQuery or JavaScript
// If that doesn't work try with $timeout:
// $timeout(function() {
// ...
//}, 0, false); // remove false if you need $apply to run