How can I run jquery code after ng-repeat

<pre><br /><code><div class="interests"><br /> <ul><br /> <li ng-repeat="items in interests" >{{ items.item }}</li><br /> </ul><br /></div><br /></code><br /></pre><p>Do i need to call a function by using directive...??</p><pre><br /><code><script><br /> var maxWidth = 0;<br /> var elemWidth = 0;<br /> $('.interests ul li').each(function() {<br /> elemWidth = parseInt($(this).css('width'));<br /> if (parseInt($(this).css('width')) > maxWidth) {<br /> maxWidth = elemWidth;<br /> }<br /> });<br /> $('.interests ul li').each(function() {<br /> $(this).css('width', maxWidth+1 + "px");<br /> });<br /></script><br /></code><br /></pre><p>Angularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs SectionAngularjs Section</p><pre><br /><code>var app = angular.module('myApp', ['Authentication', 'ngRoute', 'ngResource', 'ngCookies']);<br /><br /> app.controller("publicProfile", ['$scope', '$http', '$location', '$resource', function($scope, $http, $location, $resource){<br /><br /> /*$http.get("database.json").success(function(response){<br /> $scope.userDetails = response;<br /> //console.log("Hello22");<br /> });*/<br /><br /> $scope.interests = [<br /> {item:'likes listening to music'},<br /> {item:'likes dancing'},<br /> {item:'likes to swim'},<br /> {item:'likes running'},<br /> {item:'likes watching TV shows'},<br /> {item:'likes to travel'},<br /> {item:'likes hiking'},<br /> {item:'likes listening to music'},<br /> ];<br />}]);<br /></code><br /></pre><br /><h2>Click here view more answers <a href="%20http://stackoverflow.com/questions/34469813/how-can-i-run-jquery-code-after-ng-repeat">http://ift.tt/1YHK8O4</a></h2>

Nhận xét

Bài đăng phổ biến từ blog này

Align div to bottom of the page in bootstrap

Align elements inside an tag vertically

Javascript is unable to stop page loading