Created
December 3, 2012 17:05
-
-
Save waynehoover/4196380 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
DOM: | |
<div ng-repeat="post in posts"> | |
... | |
abbr.created-at.arial.timeago title="{{post.created_at}}" | |
</div> | |
Script: | |
.directive('postTile', function($timeout){ | |
return{ | |
restrict: 'A', | |
require: '?ngModel', | |
link: function(scope, el, attrs, ngModel){ | |
$timeout(function(){ | |
//do these jquery methods on specific items of element's children | |
$(el).find(".timeago").timeago(); | |
$(el).find(".post-add-comment").expandingTextarea({ | |
$(el).find(".desc, .hyve-desc").ellipsis(); | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment