Skip to content

TypeError: Cannot read property 'element' of undefined #53

@abomadi

Description

@abomadi

Hello,

I have the following issue when using flex-slider with my directive.

TypeError: Cannot read property 'element' of undefined
at angular-flexslider.js?cdv=975:104
at Object.fn (angular.js:14110)
at l.$get.l.$digest (angular.js:14243)
at l.$get.l.$apply (angular.js:14506)
at TrackerController.js?cdv=975:149
at angular.js:16223
at e (angular.js:4905)
at angular.js:5285

My Controller do $scope.$apply() after ng-click in my directive clicked. then the above error appears.

app.directive("weightExercise", function () {
    return {
        restrict: "AE",
        replace: "true",
        require: "^ngModel",
        templateUrl: "app/views/Templates/Weight.html"
    }
})

<flex-slider id="slider"  fslide="WOE in SelectedPlanDay.WODay[0].WorkoutExercises track by $index" item-margin="3" animation="slide" animation-loop="true" item-width="442" control-nav="false" touch="true" smooth-height="false">
            <li>
                <div class="item  active">
                    <div class="row">
               <div weight-exercise ng-model="WOE" ng-show="WOE.WeightExercises.length > 0"></div>
                </div>
            </li>
</flex-slider>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions