
Domains
Agile Management
Master Agile methodologies for efficient and timely project delivery.
View All Agile Management Coursesicon-refresh-cwCertifications
Scrum Alliance
16 Hours
Best Seller
Certified ScrumMaster (CSM) CertificationScrum Alliance
16 Hours
Best Seller
Certified Scrum Product Owner (CSPO) CertificationScaled Agile
16 Hours
Trending
Leading SAFe 6.0 CertificationScrum.org
16 Hours
Professional Scrum Master (PSM) CertificationScaled Agile
16 Hours
SAFe 6.0 Scrum Master (SSM) CertificationAdvanced Certifications
Scaled Agile, Inc.
32 Hours
Recommended
Implementing SAFe 6.0 (SPC) CertificationScaled Agile, Inc.
24 Hours
SAFe 6.0 Release Train Engineer (RTE) CertificationScaled Agile, Inc.
16 Hours
Trending
SAFe® 6.0 Product Owner/Product Manager (POPM)IC Agile
24 Hours
ICP Agile Certified Coaching (ICP-ACC)Scrum.org
16 Hours
Professional Scrum Product Owner I (PSPO I) TrainingMasters
32 Hours
Trending
Agile Management Master's Program32 Hours
Agile Excellence Master's ProgramOn-Demand Courses
Agile and ScrumRoles
Scrum MasterTech Courses and Bootcamps
Full Stack Developer BootcampAccreditation Bodies
Scrum AllianceTop Resources
Scrum TutorialProject Management
Gain expert skills to lead projects to success and timely completion.
View All Project Management Coursesicon-standCertifications
PMI
36 Hours
Best Seller
Project Management Professional (PMP) CertificationAxelos
32 Hours
PRINCE2 Foundation & Practitioner CertificationAxelos
16 Hours
PRINCE2 Foundation CertificationAxelos
16 Hours
PRINCE2 Practitioner CertificationSkills
Change ManagementMasters
Job Oriented
45 Hours
Trending
Project Management Master's ProgramUniversity Programs
45 Hours
Trending
Project Management Master's ProgramOn-Demand Courses
PRINCE2 Practitioner CourseRoles
Project ManagerAccreditation Bodies
PMITop Resources
Theories of MotivationCloud Computing
Learn to harness the cloud to deliver computing resources efficiently.
View All Cloud Computing Coursesicon-cloud-snowingCertifications
AWS
32 Hours
Best Seller
AWS Certified Solutions Architect - AssociateAWS
32 Hours
AWS Cloud Practitioner CertificationAWS
24 Hours
AWS DevOps CertificationMicrosoft
16 Hours
Azure Fundamentals CertificationMicrosoft
24 Hours
Best Seller
Azure Administrator CertificationMicrosoft
45 Hours
Recommended
Azure Data Engineer CertificationMicrosoft
32 Hours
Azure Solution Architect CertificationMicrosoft
40 Hours
Azure DevOps CertificationAWS
24 Hours
Systems Operations on AWS Certification TrainingAWS
24 Hours
Developing on AWSMasters
Job Oriented
48 Hours
New
AWS Cloud Architect Masters ProgramBootcamps
Career Kickstarter
100 Hours
Trending
Cloud Engineer BootcampRoles
Cloud EngineerOn-Demand Courses
AWS Certified Developer Associate - Complete GuideAuthorized Partners of
AWSTop Resources
Scrum TutorialIT Service Management
Understand how to plan, design, and optimize IT services efficiently.
View All DevOps Coursesicon-git-commitCertifications
Axelos
16 Hours
Best Seller
ITIL 4 Foundation CertificationAxelos
16 Hours
ITIL Practitioner CertificationPeopleCert
16 Hours
ISO 14001 Foundation CertificationPeopleCert
16 Hours
ISO 20000 CertificationPeopleCert
24 Hours
ISO 27000 Foundation CertificationAxelos
24 Hours
ITIL 4 Specialist: Create, Deliver and Support TrainingAxelos
24 Hours
ITIL 4 Specialist: Drive Stakeholder Value TrainingAxelos
16 Hours
ITIL 4 Strategist Direct, Plan and Improve TrainingOn-Demand Courses
ITIL 4 Specialist: Create, Deliver and Support ExamTop Resources
ITIL Practice TestData Science
Unlock valuable insights from data with advanced analytics.
View All Data Science Coursesicon-dataBootcamps
Job Oriented
6 Months
Trending
Data Science BootcampJob Oriented
289 Hours
Data Engineer BootcampJob Oriented
6 Months
Data Analyst BootcampJob Oriented
288 Hours
New
AI Engineer BootcampSkills
Data Science with PythonRoles
Data ScientistOn-Demand Courses
Data Analysis Using ExcelTop Resources
Machine Learning TutorialDevOps
Automate and streamline the delivery of products and services.
View All DevOps Coursesicon-terminal-squareCertifications
DevOps Institute
16 Hours
Best Seller
DevOps Foundation CertificationCNCF
32 Hours
New
Certified Kubernetes AdministratorDevops Institute
16 Hours
Devops LeaderSkills
KubernetesRoles
DevOps EngineerOn-Demand Courses
CI/CD with Jenkins XGlobal Accreditations
DevOps InstituteTop Resources
Top DevOps ProjectsBI And Visualization
Understand how to transform data into actionable, measurable insights.
View All BI And Visualization Coursesicon-microscopeBI and Visualization Tools
Certification
24 Hours
Recommended
Tableau CertificationCertification
24 Hours
Data Visualization with Tableau CertificationMicrosoft
24 Hours
Best Seller
Microsoft Power BI CertificationTIBCO
36 Hours
TIBCO Spotfire TrainingCertification
30 Hours
Data Visualization with QlikView CertificationCertification
16 Hours
Sisense BI CertificationOn-Demand Courses
Data Visualization Using Tableau TrainingTop Resources
Python Data Viz LibsCyber Security
Understand how to protect data and systems from threats or disasters.
View All Cyber Security Coursesicon-refresh-cwCertifications
CompTIA
40 Hours
Best Seller
CompTIA Security+EC-Council
40 Hours
Certified Ethical Hacker (CEH v12) CertificationISACA
22 Hours
Certified Information Systems Auditor (CISA) CertificationISACA
40 Hours
Certified Information Security Manager (CISM) Certification(ISC)²
40 Hours
Certified Information Systems Security Professional (CISSP)(ISC)²
40 Hours
Certified Cloud Security Professional (CCSP) Certification16 Hours
Certified Information Privacy Professional - Europe (CIPP-E) CertificationISACA
16 Hours
COBIT5 Foundation16 Hours
Payment Card Industry Security Standards (PCI-DSS) CertificationOn-Demand Courses
CISSPTop Resources
Laptops for IT SecurityWeb Development
Learn to create user-friendly, fast, and dynamic web applications.
View All Web Development Coursesicon-codeBootcamps
Career Kickstarter
6 Months
Best Seller
Full-Stack Developer BootcampJob Oriented
3 Months
Best Seller
UI/UX Design BootcampEnterprise Recommended
6 Months
Java Full Stack Developer BootcampCareer Kickstarter
490+ Hours
Front-End Development BootcampCareer Accelerator
4 Months
Backend Development Bootcamp (Node JS)Skills
ReactOn-Demand Courses
Angular TrainingTop Resources
Top HTML ProjectsBlockchain
Understand how transactions and databases work in blockchain technology.
View All Blockchain Coursesicon-stop-squareBlockchain Certifications
40 Hours
Blockchain Professional Certification32 Hours
Blockchain Solutions Architect Certification32 Hours
Blockchain Security Engineer Certification24 Hours
Blockchain Quality Engineer Certification5+ Hours
Blockchain 101 CertificationOn-Demand Courses
NFT Essentials 101: A Beginner's GuideTop Resources
Blockchain Interview QsProgramming
Learn to code efficiently and design software that solves problems.
View All Programming Coursesicon-codeSkills
Python CertificationInterview Prep
Career Accelerator
3 Months
Software Engineer Interview PrepOn-Demand Courses
Data Structures and Algorithms with JavaScriptTop Resources
Python TutorialMobile App Development
4.6 Rating 46 Questions 25 mins read9 Readers

Ionic is a mobile app development framework used to build hybrid apps. Hybrid apps are basically web apps running in a browser within a wrapper that has access to the native platform layer. Ionic framework is an HTML5 framework. It needs a native wrapper like Cordova or PhoneGap in order to run as a native app. Ionic framework lets you maintain one codebase and create builds for both Android and iOS platforms.
NodeJS , npm are required in order to install Ionic. You need NodeJS 6.0.0+ or a higher version in order to install ionic.
CLI means Command Line Interface. Similar to Angular, Ionic CLI comes with a number of helpful commands that let you create a new project, add pages , components, providers , directives , pipes and so on. You need the CLI to run, emulate, debug, build and deploy your application.
The syntax to create a new ionic project using ionic cli is :
ionic start <project name> <template> for e.g. ionic start hello world blank. This would create a new project with blank screen. Optionally you can mention tabs , side menu, etc. instead of blank as starter template.
Ionic 4 app has a structure similar to an angular application. e2e , node_modules, src folders will be present in root directory along with individual files like angular.json, ionic.config.json, package-lock.json, package.json, tsconfig.json, tslint.json . e2e/ folder has files for running end to end integration tests, node_modules contains all the dependencies. src/app/ folder contains most of the app code that you will be writing. App folder essentially has app.module.ts, app.component.ts, app.component.html, app.component.spec.ts and app-routing.module.ts. any services, components, pages created can be stored in their respective folders. assets/ folder can be used to store images and other static content.
As its name suggests, angular.json hosts all of the angular settings like project name, root path for app folder, source root, paths for index file, main.ts, polyfills, assets folder path, css stylesheet paths, script paths, build settings etc. ionic.config.json can be used to set proxy settings for API to avoid CORS errors during development. package.json contains a list of dependencies and serve, build, test and e2e commands.
This, along with other Ionic basic interview questions for freshers, is a regular feature in application developer interviews, be ready to tackle it with the approach mentioned above.
Every component in Ionic has a lifecycle. Ionic creates, renders the component, checks it when its data-bound properties change and destroys it finally. Ionic offers lifecycle hooks that provide a way to tap into these key moments and trigger an action when they occur.
Ionic 2 & 3 had these lifecycle events : ionViewDidLoad, ionViewWillEnter,
ionViewDidEnter, ionViewWillLeave, ionViewDidLeave, ionViewWillUnload,
ionViewCanEnter, ionViewCanLeave.
Allows you to control whether user can exit the view or not Ionic 4 provides the Angular lifecycle hooks in addition to the above listed Ionic lifecycle hooks. All the angular lifecycle hooks are available.
Ionic V4 offers significant changes in performance, compatibility with multiple frameworks and many other improvements compared to previous versions.
Ionic V4 was completely rewritten to use WebAPIs and each component is packaged as a Web Component. Web Component defines as a set of Web APIs that allow you to create HTML tags that are reusable in nature. With Web Components, we can create almost anything that can be worked with HTML, CSS, and Javascript. We can also create a portable component that can be reused.
Since it's inception Ionic Framework was built using Angular but Ionic v4 is completely independent of the base framework. Since the components of the Ionic Framework such as ion-button, are now encapsulated as Web Components. Web components work with any framework, in fact, it can be done without any framework.
In Ionic 4 there are great changes in the navigation and the Router by use of Angular Router. Ionic 3 used navigation based on a simple stack where the new pages were placed on top of the stack doing push and when we wanted to navigate backward a pop of the last page is created. Traditional websites use a linear history which means that the user navigates to a page and can press the Back button to navigate back. In Ionic Framework, applications can take this a step further by allowing parallel navigation for its user. Which means that now it is possible to have multiple navigation batteries and exchange them at any time. Also to mention NavController and ion-nav in Ionic4 have become obsolete. It can still be used but only if the application does not use Lazy Loading. Instead of NavController and ion-nav, Ionic4 uses @angular/router.
Ionic 4

Ionic 3

Life cycles of navigation (LifeCycles):
The lifecycles that were used in Ionic 3 as ionWillLoad will no longer be used in Ionic 4. It uses Angular life cycles such as ngOnInit and ngAfterViewInit.
routerLink:
In Ionic 3 the event (click) is used to navigate between pages from the HTML. In Ionic 4 we will use the routerLink , as it is used in the Angular applications.

Modules:
It is not necessary to import the pages and services in the app.module.ts file. For each page there will be a module of that page, for eg: to use Reactive Forms on any page, we only import ReactiveFormsModule on the page or pages that will use it.

Ionic does not provide a camera API. However, since Ionic uses plugins architecture, and it is based on Cordova, we can use Cordova plugins in our application. The ionic team supplies a set of Cordova extensions with Angular wrappers which can be found at ngCordova. To be able to use Cordova plugins, we need to install the plugin using Ionic command install <plugin name>. In some cases, we additionally need to add the plugin’s Angular module to your Angular application. To use a mobile phone’s camera app in the Ionic application, we can call the camera API by using cordova-plugin-camera that is hosted on GitHub. Now, this plugin defines a navigator.camera object which provides API for taking pictures and for choosing images from the system’s image library.
Expect to come across this, one of the most important Ionic interview questions and answers for experienced professionals in app development, in your next interviews.
In the Ionic framework, observables are not specific to Ionic or Angular and they are provided with RxjS library. Observables are like a commitment but a lot of things can be worked out from it. It can deal with multiple values at a time rather than just resolving one value at that time. It can also be used to manipulate the data which is associated with it. Observables cannot be executed until and unless they are subscribed to. Various operations can be applied to observables for modification and returning to a new one. We can also create our own observable. The observable pattern is combined into one with the help of the subject which is preferred for simple implementations.
Ionic Native is a TypeScript wrapper for Cordova or PhoneGap plugins which provides adding any native functionality to the Ionic mobile app. We can implement any of the Cordova plugins community in an Ionic application easily with the help of Ionic Native. One of the functionalities of an Ionic native is to write code better. We can integrate Cordova plugins without Ionic Native as well but Ionic Native add types to these Cordova plugins using wrapper classes and allow us to use intellisense and code suggestions. This prevents from running into errors and write codes quicker and better. Plugins are added frequently to the Ionic Native directory.
If you want to get advanced mode, you can open up the project file for a specific platform by opening the required XCode or Android Eclipse project in platforms/PLATFORM inside the root of your project. Then, you can build and test from the platform-specific IDE. Note: if you go this route a suggestion to work inside of the root www folder, and when you've made changes to this folder, run the command: $ cordova prepare ios which updates the iOS-specific project with the code from the www folder. Note: this will overwrite any changes made to the platforms/ios/www and other platform-specific folders.
So, to summarize this part - if you're using XCode to test and run your code after you change some part of the code you just have to run ionic prepare to update the iOS project which again you can continue to use in XCode. ionic buildcommand actually prepares the final (for example in Android it's the .apk file) file which then could be copied to your device and test by running it manually on the device (or by using the ionic emulate command to test it on the emulator).
Ionic pages are usually converted into an Angular component as we are aware Ionic frame is built on top of Angular. Just like Angular frameworks has its lifecycle hooks which we follow during the development of Web Application. Also, lifecycle events for ionic framework help in capturing and performing some specific task.
As we have discussed important lifecycle events of ionic other than this there are some more lifecycle events which would prevent unauthorized access of users.
In Ionic 4 the above mention two events can be replaced with Routing Guards.
src/app/tabs/ folder will have a tabs.router.module.ts file. Similar to Angular app routing module , routes can be configured for tabs in this file.
Routes can be configured for tabs as below :
const routes: Routes = [
{
path: 'tabs',
component: TabsPage,
children: [
{
path: 'tab1',
children: [
{
path: '',
loadChildren: '../tab1/tab1.module#Tab1PageModule'
}
]
}, {
path: 'tab2',
children: [
{
path: '',
loadChildren: '../tab2/tab1.module#Tab2PageModule'
}
]
}, {
path: 'tab3',
children: [
{
path: '',
loadChildren: '../tab3/tab3.module#Tab3PageModule'
}
]
}, {
path: '',
redirectTo: '/tabs/tab1',
pathMatch: 'full'
}
]
}
]; This is one of the most frequently asked Ionic interview questions for freshers in recent times. Make sure you go through the solution carefully.
A staple in Ionic developer interview questions with answers, be prepared to answer this using your hands-on experience. This is also one of the top interview questions to ask an Ionic developer. Here is a sample answer.
Generate a service first using ionic generate service command. Import HttpClient from @angular/common/http library. Then add HttpClient to constructor so it can be used in the service. A typical get and post request can be written as follows :
get(endpoint: string, params?: any, options?: RequestOptions) {
if (!options) {
options = new RequestOptions();
} if (params) {
let p = new URLSearchParams();
for (let k in params) {
p.set(k, params[k]);
} options.search = !options.search && p || options.search;
} return this.http.get(this.url + '/' + endpoint, options);
} post(endpoint: string, body: any, options?: RequestOptions) {
options = new RequestOptions();
options.headers = this.createHeaders();
return this.http.post(this.url + '/' + endpoint, body, options);
} Ionic 4 being based on Angular 6 / 7 , the application when created comes with a unit testing framework named Jasmine. It is automatically set up up to unit test the application. Unit tests are contained in .spec files which are created for every component, page, service , pipe, guard etc. The spec file contains a single describe call that defines the overall test.
Each describe call can contain setup and teardown code through before Each and after Each calls. Finally, it calls define individual test cases.
Below snippet shows a sample spec.ts file for a page.
describe('Tab1Page', () => {
let component: Tab1Page;
let fixture: ComponentFixture<Tab1Page>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [Tab1Page],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(Tab1Page);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
}); Slides is a UI component. This component is used as a container for layouts such as photo galleries, tutorials, questionnaires etc. A slides component can have one or more slides. User can swipe or drag to move to next slide.
Below is a brief example. Add the two functions to component.ts file and the html markup to view.
genderUpdate(gender)
{
if(gender == "M" || gender == "F")
{
this.iGender = gender;
this.slides.lockSwipes(false);
// let currentSlide = this.slides.getActiveIndex() + 1;
this.slides.slideNext();
this.slides.lockSwipes(true);
}
} ageGroupSelected(event) a
{
if(event)
{
this.ageGroup = event;
this.slides.lockSwipes(false);
this.slides.slideNext();
this.slides.lockSwipes(true);
}
} <ion-slides>
<ion-slide lockSwipeToNext="false">
<button ion-button color="danger"> Select Your Gender </button>
<ion-card class="genderIcon" (click)="genderUpdate('M')" color="danger">
<ion-card-header>
<ion-card-title> Male </ion-card-title>
</ion-card-header>
<ion-card-content>
<ion-icon name="man"></ion-icon>
</ion-card-content>
</ion-card>
<ion-card class="genderIcon" margin-top (click)="genderUpdate('F')" color="danger">
<ion-card-header>
<ion-card-title> Female </ion-card-title>
</ion-card-header>
<ion-card-content>
<ion-icon name="woman"></ion-icon>
</ion-card-content>
</ion-card>
</ion-slide>
<ion-slide lockSwipeToNext="false">
<ion-list radio-group [(ngModel)]="ageGroup" (ionChange)="ageGroupSelected($event)">
<ion-list-header class="headTitle" color="danger">
My Age Group is
</ion-list-header>
<ion-item>
<ion-label color="primary"> 0 - 17 </ion-label>
<ion-radio value="child"></ion-radio>
</ion-item>
<ion-item>
<ion-label color="primary"> 18 - 100 </ion-label>
<ion-radio value="adult" ></ion-radio>
</ion-item>
</ion-list>
</ion-slide>
</ion-slides> To create a button, we can use ion-button component. Ion-button comes with few attributes like fill , size, shape , color.
So, to create a button with rounded corners and outline without any background color, the markup would be as below :
<ion-button color=”primary” fill=”outline” shape=”round”> Submit </ion-button>