Ionic Framework Test Upwork
How can Ionic framework be injected into javascript?
angular.module('myApp', [‘ionic-app’])
angular.app('myApp', [‘ionic-app’])
angular.app('myApp', [‘ionic’])
angular.module('myApp', [‘ionic'])
Which of the following command, “copies all files from the www folder into the target platform’s www folder and builds the app’s source code so that it can be run on a simulator/emulator or a device”?
ionic emulate <platform>
ionic prepare <platform>
ionic serve <platform>
ionic build <platform>
Ionic ____ system is that it is FlexBox?
Grid
CSS
Layout
Module
Ionic components with ___ to make the page more functional?
JavaScript
AngularJS
SDK
Cordova
Which of the following options can be used to customize Ionic popup? Check all that apply.
Note: There may be more than one right answer.
subTitle
width
okText
None of the above
Which of the following $colors exists in Ionic 2? Check all that apply.
Note: There may be more than one right answer.
primary
secondary
priority
All of the above
Ionic to provide all ten of the animated _____ within 3KB?
SVGs
Gif
Banner
SWF
Which of the following commands can be used to create a component with preview-box selector?
ionic PreviewBox component -g
ionic -g component PreviewBox
ionic -g component preview-box
ionic -g PreviewBox component
How can "tap for a div and all of its children elements" be disabled?
<div data-tap-disabled=“true”> ... </div>
<div data-tap=“disable”> ... </div>
<div tap=“disable”> ... </div>
<div tap-disabled=“true”> ... </div>
Which of the following SASS files is the "main" style file in Ionic 2 project?
style.scss
main.scss
global.scss
app.scss
Which of the following SASS variables exist in Ionic 2?
$action-sheet-wp-title-text-align
$action-sheet-ios-text-align
$action-sheet-ios-border-radius
All of the above
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)
};
<ion-checkbox ion-model="myVar" ion-change=“clickMe()”></ion-checkbox>
<ion-checkbox ng-model="myVar" ng-change="clickMe()"></ion-checkbox>
<ion-checkbox ng-model="myVar" ion-change=“clickMe()”></ion-checkbox>
<ionic-checkbox ionic-model="myVar" ionic-change=“clickMe()”></ion-checkbox>
What is the default color of the button defined below?
<button class="button button-positive">
button-positive
Blue
Red
Green
Yellow
Plugins can be added using the following command?
ionic plugin add {plugin}
ionic plugin add (plugin)
ionic plugin add [plugin]
ionic plugin add “plugin”
Plugins are where Cordova stores the plugins that you add to your project. Plugins are added by the following command?
ionic plugin add {plugin}
ionic plugin install {plugin}
ionic plugin add (plugin)
ionic install plugin
Which service should be injected into controller to make http request?
$http
$httpRequest
$httpSession
$httpConnection
Which component does not exist in Ionic 2?
Checkbox
Tooltip
Slides
Toast
Which of the following is the correct explanation of abbreviation FAB?
Flexbox Active Bar
Front Action Block
Floating Action Buttons
Feature Attribute Buttons
Which of the following plugins exists in Ionic Native? Check all that apply.
Note: There may be more than one right answer.
Camera
Charger
Bluetooth Status
All of the above
For example, the NativeStorage is connected.
Which of the following lines of code correctly adds newItem to storage ?
new NativeStorage('newItem', {new: 1});
NativeStorage.setItem('newItem', {new: 1}).then(()=>);
NativeStorage.newItem('newItem', {new: 1}, cb);
NativeStorage.set('newItem', {new: 1});
Which of the following methods will display location on the map with special zoom level?
getLocation
animateMap
zoomCamera
animateCamera
Disable all caching globally in Ionic?
$ionicConfigProvider.views.maxCache(true);
$ionicConfigProvider.views.maxCache(false);
$ionicConfigProvider.views.maxCache(0);
$ionicConfigProvider.view.maxCache(1);
Which of the following disables caching the views in Ionic apps?
$ionicConfigProvider.views.maxCache(0);
$ionicConfigProvider.views.setCache(0);
$ionicConfigProvider.disableViews();
$ionicConfigProvider.setViews(false);
Which directive in Ionic allows to show huge lists, without affecting scroll performance?
Ionic-list-repeat
ion-list-repeat
ng-repeat
collection-repeat
Which of the following plugins can be used for safety storage?
cordova-plugin-safe-storage
cordova-plugin-secure-storage
cordova-plugin-sqlite-storage
cordova-plugin-sql-storage
Which of the following global objects will include installed plugin?
navigator.plugins
window.plugins
plugins
All of the above
What are the methods of the ionic.EventController?
on, of, trigger, onGesture, ofGesture
on, of, trigger
subscribe, unsubscribe, trigger
add, remove, trigger
Which of the following are Ionic 2 decorators?
Note: There may be more than one right answer.
@Pipe
@Push
@Page
@Plugin
Which of the following Cordova plugins can be used for geolocation?
cordova-plugin-geolocation
cordova-geolocation-plugin
geolocation-plugin
navigator.geolocation
Which of the following lines of code will pass the {status: "ACTIVE"} to MainPage ?
this.nav.push(MainPage).push({status: "ACTIVE"});
this.nav.pop(MainPage, {status: "ACTIVE"});
this.nav.push(MainPage, {status: "ACTIVE"});
this.nav(MainPage).locationPath({status: "ACTIVE"});
Which of the following properties can be passed while creating marker?
lat
snippet
lng
All of the above
How do you persist data between application launches? Check all that apply.
Note: There may be more than one right answer.
localStorage
sessionStorage
webStorage
appStorage
Which of the following components allows you to see the next page in navigation stack?
naxNext
navPop
navPush
locationPath
The CLI automatically adds a new ........... named resources.
Folder
File
Icon
Screen
By default, Ionic will cache a maximum of ............... views.
10
15
30
40
Which of the following Google Maps instances exist in ionic-native after installing google-maps package? Check all that apply.
Note: There may be more than one right answer.
GoogleMapsLatLng
GoogleMap
GoogleMapsEvent
All of the above
In Ionic, localStorage has size limit around?
5 MB
10 MB
15 MB
20 MB
Which directive is used to attach a controller to the DOM?
ionic-controller
ion-controller
ionic-controller
ng-controller
Ionic is a open source, front-end?
SDK
Tool
Framework
Language
Ionic is front end __ framework built on top of AngularJS and Cordova?
HTML
JS
PHP
Hybrid
Which of the following params should be passed first while creating new Map instance ?
Class of element
DOM element
ID of element
All of the above
Which of the following lines shows the Unique Device id ?
console.log(Device.device.id);
console.log(Device.device.uuid);
console.log(Device.uuid);
console.log(Device.device);
Which one is the main class for Header & Footer?
header
bar
footer
None of the Above
What is the impact on performance of localStorage in an Ionic app?
You should replace localStorage values frequently, because once you set value it will not be changed unless you change it.
If the application goes with large data, you have to choose Sqlite.
Avoid storing complex data in localStorage, because you should not play with code logic with the help of localStorage.
All of the above
What options will allow you to get the input value within Ionic 2 in my Component?
<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>
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);
}
}
}
Both of the above
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);
}
}
Use an 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. Choose the best option.
<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>
<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>
Both of the above
None of the above
A complex popup has a buttons _____ with each button having a text.
Array
String
Label
Property
Which code below will add a custom page transition on Ionic 2?
import { Config } from 'ionic-angular';
@NgModule({})
class AppModule {
constructor(private config: Config) {
this.config.setTransition('fade-transition', FadeTransition);
}
}
import { Component} from '@angular/core';
import { NavController, Slides} from 'ionic-angular';
@Component({
constructor(private config: Config) {
this.config.setTransition('fade-transition', FadeTransition);
})
import { NavController, Slides} from 'ionic-angular';
@Component({
constructor(private config: Config) {
this.config.setTransition('fade-transition', FadeTransition);
})
All of the above
Which of the following statements are true about Ionic-nav-view? (choose all that apply)
Note: There may be more than one right answer.
used for navigation
should be placed in index.html
none of the above
should be placed inside app folder
In AppCtrl controller, how can you retrieve and set the platform using ionic.Platform?
.controller('AppCtrl', function($scope) {
$scope.platform = Platform.platform();
})
.controller('AppCtrl', function($scope) {
$scope.platform = ionic.Platform.platform();
})
Both of the above
.controller('AppCtrl', function($scope) {
$scope.platform => ionic.platform();
})
Which of the following components are needed to start with Ionic? Check all that apply.
Note: There may be more than one right answer.
NodeJS
Android SDK
XCode
Cordova and Ionic
MeteroJS
Which service is used for Ionic Popover?
$ionicPopup
$ionicPopover
$ionicPopup
All of the above
Which gesture is used for the touch that stays at the same location 500ms?
on-hold
on-tap
on-pressed
on-touch
Ionic provides custom ............... and methods?
Classes
Methods
Components
Controller
How you can remove caching completely in Ionic?
$http.get('content.js').success(function(response) {
$scope.doRefresh()
});
$http.get('content.js').getSuccess(function(response) {
$scope.doRefresh()
});
$scope.$on('$ionicView.beforeEnter', function () {
$scope.doRefresh();
});
All of the above
Which option is used for making a choice or editing an item by temporarily going over the user's main view?
Modal
View
Controller
Model
Which cordova plugin is used to open external links from your app inside a web browser view?
org.apache.cordova.browser
org.apache.cordova.inappbrowser
org.apache.native.inappbrowser
org.apache.cordova.lonicbrowser
Which of the following are Ionic Events? Check all that apply.
Note: There may be more than one right answer.
on-hold
on-touch
on-hide
on-swipe
Which of the following controllers is responsive for navigating in Ionic 2?
StateController
NavigationController
NavController
RouteController
Which of following options are true regarding native audio? Check all that apply.
Note: There may be more than one right answer.
preloadSimple is used for simple sounds that will be played once
preloadComplex for sounds that will be played as looping sounds or background audio
preloadSimple is used for background audio
All of the above
Ionic provides all ten of the animated _____ within 3KB.
SVGs
Gif
Banner
SWF
Which option displays Ionic framework JSON data retrieving?
$http.get('content.js').success(function(response) {
//whereever you want to put the data
});
$http.get('content.js').addSuccess(function(response) {
//whereever you want to put the data
});
$http.get('content.js').getSuccess(function(response) {
//whereever you want to put the data
});
All of the above
Which service is used for navigation in Ionic?
$navigationProvider
$ionicHistory
Both of the above
$viewProvider
Which of the following life cycle events exist in Ionic 2 navigation? Check all that apply.
Note: There may be more than one right answer.
ionViewDidEnter
ionViewInitLoad
ionViewDidLoad
All of these.
What can be called after the current play/record or stop action has completed?
mediaSuccess
mediaComplete
mediaStatus
All of the above
Ionic has ................. that are purely CSS-driven.
modal
components
controller
template
Which of the following properties can be passed to create method of Toast component?
Note: There may be more than one right answer.
duration
position
class
All of these
Using the following code, how can you disable cache with an attribute?
<ion-view cache-view="false" view-title="My Title!">
...
</ion-view>
<ion-view cache-view="true" view-title="My Title!">
...
</ion-view>
Both of the above
None of the above
Which option allows you to include ngCordova plugins in an Ionic app?
cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
module.controller('BarcodeCtrl', function($scope, $cordovaBarcodeScanner) {
document.addEventListener("deviceready", function () {
$cordovaBarcodeScanner
.scan()
.then(function(barcodeData) {
// Success! Barcode data is here
}, function(error) {
// An error occurred
});
)};
Both of the above
module.controller('BarcodeCtrl', function($scope, $cordovaBarcodeScanner) {
document.addEventListener("deviceready", function () {
$cordovaBarcodeScanner{
.then(function(barcodeData) {
// Success! Barcode data is here
}, function(error) {
// An error occurred
});
)};
Which of the following are True regarding Ionic Framework?
Note: There may be more than one right answer.
Ionic is open source
Ionic is used for developing mobile application
It provides tools and services for building mobile UI with native look and feel
None of the above
Which command(s) can you use to start an an app from scratch?
ionic start myApp blank
ionic start myApp tabs
ionic start myApp sidemenu
All of the above
Which of the following is the correct way to pass data between Controller/View in Ionic?
.controller('SearchResultsCtrl', function($scope, $state, $stateParams) {
$scope.results = $stateParams.result;
});
.controller('SearchCtrl', function($scope, $state, $http) {
$scope.search = function() {
console.log('Starting search..');
var res = $http.post('http://endpoint:8080/search',{"language":"en"})
.success(function(data) {
alert("Search OK");
//take the data.results and make sure its available when I move to tab.search-results
$state.go('tabs.search-results', {result: data});
}).error(function(data) {
alert("Search Bad");
});
};
})
.controller('SearchCtrl', function($scope, $state, $http) {
$scope.search = function() {
console.log('Starting search..');
var res = $http.post('http://endpoint:8080/search',{"language":"en"})
.success(function(data) {
//take the data.results and make sure its available when I move to tab.search-results
alert("Search OK");
})
.error(function(data) {
alert("Search Bad");
});
//take the data.results and make sure its available when I move to tab.search-results
$state.go('tabs.search-results');
};
})
All of the above
How can you call node server using ionic?
angular.module('starter.services', ['ngResource'])
.factory('Session', function ($resource) {
return $resource('http://XXX.XXX.XXX.XXX:5000/sessions/:sessionId');
});
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello World!');
});
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
});
Both of the above
angular.module('starter.services', ['ngResource'])
.factory('Session', function ($resource) {
return $resource{('http://XXX.XXX.XXX.XXX:5000/sessions/')};
});
Toggle can be implemented using how many Ionic classes?
one
two
three
four
Which of the following are CSS components of Ionic?
Note: There may be more than one right answer.
Colors
Checkbox
Backdrop
All of the above
Ionic Framework Test Upwork 2019