Hi, I have a 'slider' directive and 'poster-info' directive, like this:
<div class="row center-block swiper-container" id="onNow" slider>
<div class="schedules swiper-wrapper">
<poster-info></poster-info>
</div>
</div>
However, the slider directive needs to wait until poster-info is completely
loaded, otherwise it won't work. See the code:
mainApp.directive('slider', ['$timeout', function ($timeout) {
return {
restrict: "A",
link: function (scope, element, attrs) {
$(element).swiper({
slidesPerView: "auto"
});
}
}
}]);
mainApp.directive('posterInfo', [function () {
return {
restrict: "E",
replace: true,
templateUrl: "../../mainModule/templates/posterInfo.html",
scope: {
}
};
}]);
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.