Our team has conducted extensive research to compile a set of Ionic Framework MCQs. We encourage you to test your Ionic Framework knowledge by answering these multiple-choice questions provided below.
Simply scroll down to begin!
27- By default Ionic will cache a maximum of ____ views?
A. 10
B. 15
C. 30
D. 40
How do you persist data between application launches and you can use?
A. localStorage
B. sessionStorage
C. webStorage
D. webStorage -WRONG ANS
Which of the following Google Maps instances are exists in ionic-native after installing google-maps package ?
A. GoogleMapsLatLng
B. GoogleMap
C. GoogleMapsEvent
D. All of the above -WRONG ANS
Which of the following attribute needed to define for ionic application?
A. ng-app
B. ion-module
C. ionic-app
D. ion-app
Assume use the following code int the controller , Which of the following prints the value of the myVar in each click to the checkbox? $scope.myVar = false; $scope.clickMe = function(){ console.log(myVar) };
A. <ion-checkbox ion-model="myVar" ion-change=“clickMe()”></ion-checkbox>
B. <ion-checkbox ng-model="myVar" ng-change="clickMe()"></ion-checkbox>
C. <ion-checkbox ng-model="myVar" ion-change=“clickMe()”></ion-checkbox>
D. <ionic-checkbox ionic-model="myVar" ionic-change=“clickMe()”></ion-checkbox>
Ionic has __ that are purely CSS-driven?
A. modal
B. components
C. controller
D. template
Which of the following plugins are exists in Ionic Native?
A. Camera
B. Charger
C. Bluetooth Status
D. Bluetooth Status -WRONG ANS
Which of the following components is not exist in Ionic 2?
A. Checkbox
B. Tooltip
C. Slides
D. Toast
A. naxNext
B. navPop
C. navPush
D. locationPath
The CLI automatically adds a new ____ named resources?
A. Folder
B. File
C. Icon
D. Screen
Which gesture is used for the touch stays at the same location 500ms?
A. on-hold
B. on-tap
C. on-pressed
D. on-touch
Which of the following $colors are exists in Ionic 2?
A. primary
B. secondary
C. priority
D. All of the above -WRONG ANS
Which of the following is correct explanation of abbreviature FAB?
A. Flexbox Active Bar
B. Front Action Block
C. Floating Action Buttons
D. Feature Attribute Buttons
A. ionViewDidEnter
B. ionViewInitLoad
C. ionViewDidLoad
D. All of these. -WRONG ANS
Which of the following options can be used to customize Ionic popup?
A. subTitle
B. width
C. okText
D. None of the above -WRONG ANS
Remove pager (dots) in new ion-slides ionic component?
A. options="{pagination: false}"
B. options="{pagination: true}"
C. <ion-slide-box show-pager="true">
D. <ion-slide-box pager="false">
Which of the following components needed to start with Ionic?
A. NodeJS
B. Android SDK
C. XCode
D. Cordova and Ionic
E. MeteroJS
Choose a correct answer, Ionic framework JSON data retrieving?
A. $http.get('content.js').success(function(response) { //whereever you want to put the data });
B. $http.get('content.js').addSuccess(function(response) { //whereever you want to put the data });
C. $http.get('content.js').getSuccess(function(response) { //whereever you want to put the data });
D. All of the above
Toggle can be implemented using Ionic classes?
A. one
B. two
C. three
D. four
Use input-label to place a label to the left of the input element. When the user enters text the label does not hide. Note that there's nothing stopping you from also using a placeholder label too?
A. <div class="list"> <label class="item item-input"> <span class="input-label">Username</span> <input type="text"> </label> <label class="item item-input"> <span class="input-label">Password</span> <input type="password"> </label> </div>
B. <div class="list"> <label class="item item-input"> <input type="text" placeholder="First Name"> </label> <label class="item item-input"> <input type="text" placeholder="Last Name"> </label> <label class="item item-input"> <textarea placeholder="Comments"></textarea> </label> </div>
C. Both of the above
D. None of the above
What is the Ionic Framework Features as following?
A. AngularJS, CSS components
B. JavaScript components, Cordova Plugins
C. Ionic CLI, Ionic View
D. Licence
E. All of the above
A. <ion-list> <div ng-repeat="group in groups"> <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>
B. $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; }
C. }; $scope.isGroupShown = function(group) { return $scope.shownGroup === group; }; $scope.group = []; for (var i=0; i<10; i++) { $scope.groups[i] = { name: i, item: [] }; $scope.isGroupShown = function(group) { return $scope.shownGroup === group; };
D. All of the above -WRONG ANS
Called after current play/record or stop action has completed?
A. mediaSuccess
B. mediaComplete
C. mediaStatus
D. All of the above
How i can get the input value within ionic 2 in my Component as following?
A. <ion-header> <ion-navbar primary> </ion-navbar> </ion-header> <ion-content> <ion-item> <button lightgray full (click)="incrementQty()">+</button> <ion-item> <ion-input type="number" min="1" [value]="qty" [(ngModel)]="qty"></ion-input> </ion-item> <button lightgray full (click)="decrementQty()">-</button> </ion-item> </ion-content>
B. <ion-header> <ion-navbar primary> </ion-navbar> </ion-header> <ion-content> <ion-item> <button lightgray full (click)="incrementQty()">+</button> <ion-item> <ion-input type="number" min="1" [value]="qty" [(ngModel)]="qty"></ion-input> </ion-item> <button lightgray full (click)="decrementQty()">-</button> </ion-item> </ion-content>
C. Both of the above
D. import { Component} from '@angular/core'; import { NavController, Slides} from 'ionic-angular'; @Component({ templateUrl: 'build/pages/titlepage/titlepage.html', }) export class titlePage { qty:any; constructor({private nav: NavController)} { this.qty = 1; } // increment product qty incrementQty() { console.log(this.qty+1); this.qty += 1; } // decrement product qty decrementQty() { if(this.qty-1 < 1 ){ this.qty = 1 console.log('1->'+this.qty); }else{ this.qty -= 1; console.log('2->'+this.qty); } }
A. navBarIon
B. ionNavBar
C. navIcon
D. nabBarIcon
How to include ngCordova plugins in my Ionic app?
A. cordova plugin add https://github.com/wildabeast/BarcodeScanner.git module.controller('BarcodeCtrl', function($scope, $cordovaBarcodeScanner) { document.addEventListener("deviceready", function () { $cordovaBarcodeScanner .scan()
B. .then(function(barcodeData) { // Success! Barcode data is here }, function(error) { // An error occurred }); )};
C. Both of the above
D. module.controller('BarcodeCtrl', function($scope, $cordovaBarcodeScanner) { document.addEventListener("deviceready", function () { $cordovaBarcodeScanner{ .then(function(barcodeData) { // Success! Barcode data is here }, function(error) { // An error occurred }); )};
What are the Ionic Events?
A. on-hold
B. on-touch
C. on-hide
D. on-swipe WRONG ANS
Add custom page transition on ionic 2, As following code?
A. import { Config } from 'ionic-angular'; @NgModule({}) class AppModule { constructor(private config: Config) { this.config.setTransition('fade-transition', FadeTransition); } }
B. import { Component} from '@angular/core'; import { NavController, Slides} from 'ionic-angular'; @Component({ constructor(private config: Config) { this.config.setTransition('fade-transition', FadeTransition); })
C. import { NavController, Slides} from 'ionic-angular'; @Component({ constructor(private config: Config) { this.config.setTransition('fade-transition', FadeTransition); })
D. All of the above
The view is about to enter and become the active view?
A. $ionicView.beforeEnter
B. $ionicView.beforeLeave
C. $ionicView.afterEnter
D. $ionicView.afterLeave
The view is about to enter and become the active view?
A. $navigationProvider
B. $stateProvider
C. Both of the above
D. $viewProvider
The $ionicConfigProvider can be used to set the maximum allowable views which can be cached, But this can also be use to disable all caching by the following setting?
A. $ionicGetProvider.views.maxCache(0);
B. $ionicAddProvider.views.maxCache(0);
C. $ionicConfigProvider.views.maxCache(0);
D. $ionicProvider.views.maxCache(0);
A. .state('tab.chats', { urls: '/chats', views: { 'tab-chats': { templateUrls: 'templates/tab-chats.html', controller: 'ChatsCtrl' } } })
B. .state('tab.chats', { urls: '/chats', views: { 'tab-chats': { templateUrls: 'templates/tab-chats.html', controller: 'ChatsCtrl' } } })
C. Both of the above
D. None of the above
Sub header is created when bar-subheader class is added to ion-header-bar. We will add bar-assertive class to apply red color to our sub header?
A. <ion-header-bar class="bar-positive"> <div class="buttons"> <button class="button">Button</button> </div> <h1 class="title">Title!</h1> <div class="buttons"> <button class="button icon ion-home">Subheader</button> </div> </ion-header-bar>
B. Sub header is created when bar-subheader class is added to ion-header-bar. We will add bar-assertive class to apply red color to our sub header?
C. Both of the above
D. None of the above
Used the clear method to entire view history?
A. clearHistory()
B. clearCache()
C. clearHistorys()
D. All of the above
A. used for navigation
B. should be placed in index.html
C. None of the above
D. should be placed inside app folder -WRONG ANS
The __ is a content pane that can go over the user’s main view temporarily. Usually used for making a choice or editing an item?
A. Modal
B. View
C. Controller
D. Model
All Ionic color classes can be applied to toggle element?
A. Multiple Toggles
B. Styling Toggle
C. Toggle
D. All of the above
How to set ion-select component with 100% width in IONIC 2?
A. .myCustomSelect{ max-width: 100% !important;}
B. .myCustomSelect{ width: 100% !important; }
C. .myCustomSelect{ component-width: 100% !important; }
D. All of the above
Which of the following components needed to start with Ionic?
A. NodeJS
B. Android SDK
C. XCode
D. Cordova and Ionic
E. MeteroJS -WRONG ANS
Which of the following plugins can be used for safety storage?
A. cordova-plugin-safe-storage
B. cordova-plugin-secure-storage
C. cordova-plugin-sql-storage
D. cordova-plugin-sql-storage
27- By default Ionic will cache a maximum of ____ views?
A. 10
B. 15
C. 30
D. 40
How do you persist data between application launches? Check all that apply.
A. localStorage
B. sessionStorage
C. webStorage
D. webStorage
How do you persist data between application launches and you can use?
A. localStorage
B. sessionStorage
C. webStorage
D. webStorage
In Ionic, localStorage has size limit around?
A. 5 MB
B. 10 MB
C. 15 MB
D. 20 MB
Which of the following disables caching the views in Ionic apps?
A. $ionicConfigProvider.views.maxCache(0);
B. $ionicConfigProvider.views.setCache(0);
C. $ionicConfigProvider.disableViews();
D. $ionicConfigProvider.setViews(false);
Disable all caching globally in Ionic?
A. $ionicConfigProvider.views.maxCache(true);
B. $ionicConfigProvider.views.maxCache(false);
C. $ionicConfigProvider.views.maxCache(0);
D. $ionicConfigProvider.view.maxCache(1);
Which of the following Cordova plugins can be used for geolocation?
A. cordova-plugin-geolocation
B. cordova-geolocation-plugin
C. geolocation-plugin
D. navigator.geolocation
Which of the following Google Maps instances exist in ionic-native after installing google-maps package? Check all that apply.
A. GoogleMapsLatLng
B. GoogleMap
C. GoogleMapsEvent
D. All of the above
Which of the following Google Maps instances are exists in ionic-native after installing google-maps package ?
A. GoogleMapsLatLng
B. GoogleMap
C. GoogleMapsEvent
D. All of the above
Which of the following properties can be passed to create method of Toast component?
A. duration
B. position
C. class
D. All of these.