This is not working, because the posterInfo.html is not completely loaded 
when slider is executed. How can I accomplish this?

On Monday, May 26, 2014 11:59:21 AM UTC-3, Joberto Diniz wrote:
>
> 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.

Reply via email to