ion-item class="item-stable" ng-click="toggleGroup(group)" ng-class="{active: isGroupShown(group)}"> i class="icon" ng-class="isGroupShown(group) ? 'ion-minus' : 'ion-plus'"> /i> Group {{group.name}} /ion-item> ion-item class="item-accordion" ng-repeat="item in group.items" ng-show="isGroupShown(group)"> {{item}} /ion-item> /div> /ion-list>, 2.$scope.groups = []; for (var i=0; i<10; i++) { $scope.groups[i] = { name: i, items: [] }; for (var j=0; j<3; j++) { $scope.groups[i].items.push(i + '-' + j); } } $scope.toggleGroup = function(group) { if ($scope.isGroupShown(group)) { $scope.shownGroup = null; } else { $scope.shownGroup = group; } }; $scope.isGroupShown = function(group) { return $scope.shownGroup === group; };, 3.$scope.group = []; for (var i=0; i<10; i++) { $scope.groups[i] = { name: i, item: [] }; $scope.isGroupShown = function(group) { return $scope.shownGroup === group; };, 4.All of the above">

Ionic Framework MCQs

How can you create a dropdown menu & side menu in Ionic? (choose all that apply)

Answer

Correct Answer: $scope.groups = []; for (var i=0; i<10; i++) { $scope.groups[i] = { name: i, items: [] }; for (var j=0; j<3; j++) { $scope.groups[i].items.push(i + '-' + j); } } $scope.toggleGroup = function(group) { if ($scope.isGroupShown(group)) { $scope.shownGroup = null; } else { $scope.shownGroup = group; } }; $scope.isGroupShown = function(group) { return $scope.shownGroup === group; };

Explanation:

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

Ionic Framework Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Ionic Framework Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it