thenikso / angular-flexslider

AngularJS directive to use Woothemes' FlexSlider jQuery plugin.
MIT License
189 stars 100 forks source link

Dynamically change rtl - ltr direction #72

Open TeodorKolev opened 9 years ago

TeodorKolev commented 9 years ago

For example: We have a button with rootScope functions attached on. When click must change the options in .js file. Does that possible I have tried variations of thiese but it did not working:

            $scope.$watch('myVariable', function (newVal) {
                if(newVal == 'true'){
                    $scope.en = 'rtl: false';
                    console.log($scope.en);
                } else  {
                    $scope.en = 'rtl: true';
                    console.log($scope.en);
                }
            });
            options = {
                rtl: $scope.en
            };

          $scope.$watch('myVariable', function (newVal) {
                if(newVal == 'en'){
                    $scope.en = true;
                } else  {
                    $scope.en = false;
                }
            });
            options = {
                ff: function(){
                    if($scope.en){
                        rtl: false
                    }else {
                        rtl: true
                    }
                }
            };

In console values are changing of course but no result on options itself. Thanks

TeodorKolev commented 9 years ago

Does that repo dead?