jQWidgets Forums

jQuery UI Widgets Forums Plugins AngularJS ng-repeat with the expander

This topic contains 2 replies, has 2 voices, and was last updated by  Ankit Shah 8 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • ng-repeat with the expander #85537

    todd.cochran
    Participant

    I am having an issue with using the ng-repeat and the expander. Please consider the following code:

    
     <script type="text/javascript">
            var demoApp = angular.module("demoApp", ["jqwidgets"]);
            demoApp.controller("demoController", function ($scope) {
                $scope.componentTypes = [{
                    Id: 1,
                    Title: "Input",
                    Available: ['Calendar','DatetimeInput','DropDownList']
                },
                    {
                        Id:2,
                        Title: "Buttons",
                        Available: ['Button','DashboardFilterButton']
                    },
                    {
                        Id:3,
                        Title: "Data",
                        Available: ['DataTable','GoogleMap']
                    }
                ];
                
             //   $scope.componentTypes = $scope.componentTypes[0];
            });
        </script>
    </head>
    <body ng-controller="demoController">
    
        <jqx-expander data-ng-repeat="compType in componentTypes" jqx-width="250" jqx-height="150" >
            <div>{{compType.Title}}</div>
            <div>
                <ul data-ng-repeat="comp in compType.Available">
                    <li>{{comp}}</li>
                </ul>
    
            </div>
        </jqx-expander>
    
    </body>
    </html>

    If I get rid of the ng-repeat on the expander and adjust the code to just use one componentType, everything works. When attempting to use the repeat on the expander, it will only go through the componentTypes and ignore all of the settings I set on the expander. My guess is that I am missing something pretty simple

    thanks

    ng-repeat with the expander #85544

    todd.cochran
    Participant

    I was able to resolve the issue by using ng-repeat-start and end

    ng-repeat with the expander #85750

    Ankit Shah
    Participant

    hello todd.cochran,

    If you can provide your solution in the thread, that would be helpful to others.

    Thanks in advance,

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.