I am trying to manipulate DOM in an AngularJS Directive using a Jquery plugin.
I am not sure if AngularJs is using the full version of Jquery or not, although the full version script is on the head while AngularJs script is on the body so in theory AngularJS should use the full version. However, the log entry inside directive does not show anything is selected. While the exact same syntax inside Chrome console returns all the lis inside the ul.
Here's the Html
<ul id="myUl" class="gallery unstyled">
<li class="galleryitem" ng-repeat="i in images">
<a href="{{i.LargeImage.URL}}"><img ng-src="{{i.MediumImage.URL}}" /></a>
</li>
</ul>
Directive
.directive('gallery',function() {
return {
restrict : 'C',
link : function postLink(scope, iElement, iAttrs) {
console.log($(".gallery li"));
}
}
}
PS: I just realized that
console.log($(".gallery"));
does return the ul with li within them but not
console.log($(".gallery li"));
Which makes me think that the full version is not loaded.