Ionic Interview Questions & Answers

5 avg. rating (100% score) - 1 votes

Ionic Interview Questions & Answers

Ready to face interview for Ionic? Do not worry, we are here to help you with job interview preparation. If you are preparing for Ionic job interview and not sure which questions are likely asked in interview, we suggest you to go through Wisdomjobs Ionic interview questions and answers page to crack your job interview. Ionic is a mobile application. It is a open source SDK that can be used to develop mobile, desktop and web apps. Ionic helps to build, deploy, test the apps easily. Many organization use this framework to develop apps. There are many jobs related to this across the globe. Below is the list of frequently asked Ionic interview questions and answers which gets you ready to face the interviews:

Ionic Interview Questions

Ionic Interview Questions
    1. Question 1. What Are Hybrid Mobile Apps?

      Answer :

      Hybrid apps are actually developed using a combination of the native and HTML5-based web features. An HTML5 mobile app is basically a web page, or chain of web pages, that are developed to run on a small screen. Hybrid development unites the best and leaves the worst points of both the native and HTML5 platforms. Hybrid app can also be called as a web app, which is initially developed using HTML5 and JavaScript and then it is wrapped in a lean native container that makes it accessible to native platform features as well. Apart, from being a bit slow platform in accessing NFC, Bluetooth, etc and requires a third party plug-in, hybrid platform has handful of advantages. A hybrid application has a potential to develop applications using Android, Windows and Blackberry in spite of the factor that each of the platform requires different development environment, language and framework. To get a prominent presence in the app store without spending significant effort for developing a different app, companies develop hybrid apps as wrappers for an existing web page. Moreover, hybrid apps are also popular because they allow cross-platform development. That means, developers can reuse the same HTML code components on different mobile operating systems, which in turn, reduces significantly the development costs. Tools like PhoneGap and Sencha Touch allow users to design and code across platforms, using the power of HTML.

    2. Question 2. What Are The Most Prominent Advantages And Disadvantages Of Building Applications Using The Ionic Framework?

      Answer :

      The most obvious advantages are:

      Ionic framework builds hybrid applications using web technologies. It means web developers can easily build mobile applications too. Also, because it uses JavaScript, almost the same codebase can be used to build both iOS and Android applications.

      Development cost is less compared to native iOS and Android applications.

      Ionic framework is excellent for quick application ideas prototyping.

      Some of the disadvantages are:

      It is not suited for high-end graphics dependent applications or games.

      Performances are not as good as native applications, namely animations, scrolling, and network operations.

      As mentioned, JavaScript animations are not as performant as native animations. However, there are JavaScript libraries, like tweenMAX, which provide decent animation performance on the devices.

    3. Question 3. Why Build Native Apps, When Hybrid Apps Development Frameworks Are There?

      Answer :

      Some of the following could not be achieved effectively using web frameworks:

      Access to platform-specific UI components, like maps, date pickers, switches, and navigation stacks.

      Native mobile gesture recognizers

      Complex and sophisticated threading models that help parallelize work onto multiple threads.

    4. Question 4. What Is The Difference Between Phonegap, Cordova, And Ionic?

      Answer :

      PhoneGap is a library that exposes native mobile phone functionalities as JavaScript API. When Adobe purchased PhoneGap, its open source core was donated to the Apache Software Foundation under the name Cordova. In the beginning, there was almost no difference between Cordova and PhoneGap. Although, over the years of development, Adobe started adding a proprietary set of the services to PhoneGap. Today, it is safe to say PhoneGap is Cordova plus extra Adobe services.

      Ionic uses Cordova, not PhoneGap for its core tools. Beside native mobile phone functionalities, Ionic gives structure and code scalability to JavaScript applications by using AngularJS. It also provides a set of Angular directives and components to speed up application development.

    5. Question 5. What Are Some Of The Disadvantages Of Building Native Apps?

      Answer :

      Even a small change needs a recompile that slows up the developers. This become a nightmare when the codebase is very large.

      Testing new functionality is cumbersome.

      Calls between native and interpreted environment could end up blocking UI thread.

    6. Question 6. How Do You Persist Data Between Application Launches Using Ionic Framework?

      Answer :

      As Ionic behind the scene builds HTML5 based applications, you can use localStorage and sessionStorage API to persist data on the mobile phone. However, since localStorage can only store strings, objects need to be stringified before saving. Also, it is important to mention localStorage has size limit around 5MB.

    7. Question 7. How Do You Pass Data From One View To Another In Ionic Applications?

      Answer :

      Ionic uses AngularJS and UI-router. It means you can use Angular services or UI-router’s state resolve to pass data from one view to another. Since Angular services are singletons, data stored in services can be accessed across other Angular controllers.

      As mentioned, UI-router provides a resolve configuration. For example:

      $stateProvider

      .state(‘todos’, {

      url: ‘/todos’,

      controller: ‘TodosCtrl’,

      templateUrl: ‘todos.html’,

      resolve: {

      todos: function(TodosService) {

      return TodosService.getTodos()

      }

      }

      })

    8. Question 8. How Can You Render A 5000 Item List In Ionic, Without Affecting Scroll Performance?

      Answer :

      Ionic provides a collection-repeat directive that renders only visible items in the DOM. So even if the list is huge, like 5000 in our example, only items visible in a viewport are rendered. Thus, scroll performance is not affected.

    9. Question 9. Give Some Examples Of Hybrid Mobile App Frameworks?

      Answer :

      1. Ionic
      2. Mobile Angular UI
      3. Intel XDX
      4. Appcelerator Titanium
      5. PhoneGap
      6. Kendo UI

    10. Question 10. What Is The Advantage Of Caching The Views In Ionic Apps? Provide Examples.

      Answer :

      Ionic by default caches up to ten views, which improves performance and also maintains different states in the views at the same time. For example, the cache can maintain scroll position in the views or active state of buttons.

      Caching can be disabled per view by using cache: false in UI-router’s state config, like in the following example:

      $stateProvider.state(‘myState’, {

      cache: false,

      url : ‘/myUrl’,

      templateUrl : ‘my-template.html’

      })

      Caching can be also disabled globally, by setting maxCache to 0:

      $ionicConfigProvider.views.maxCache(0);

    11. Question 11. How Can You Detect A Platform (android Or Ios) At Runtime In Ionic Application?

      Answer :

      Ionic provides platform classes: when the application is loaded, Ionic adds CSS classes to the <body> tag. For example, on iOS devices, Ionic adds platform-ios class to <body> tag. Ionic also adds OS version classes such as platform-ios8 (for iOS 8) and platform-android4_4 (for Android 4.4).

    12. Question 12. How Can You Access Mobile Phone Native Functionality In Ionic Applications, For Example The Camera?

      Answer :

      Ionic does not provide a camera API out of the box. However, since Ionic uses plugins architecture, and because it is based on Cordova, we can use Cordova plugins in our application. Ionic team provides a set of Cordova extensions with Angular wrappers, and they can be found at ngCordova.

      To use Cordova plugins, we need to install the plugin using Ionic command install <plugin name>. In some cases, we will additionally need to add the plugin’s Angular module to your Angular application too.

      To use a mobile phone’s camera in the Ionic application, we can call the camera API by using cordova-plugin-camera that is hosted on GitHub. This plugin defines a global navigator.camera object, which provides an API for taking pictures and for choosing images from the system’s image library.

    13. Question 13. How Can You Test Ionic Applications?

      Answer :

      Ionic applications are built using AngularJS. Angular has a rich set of test libraries and frameworks such as Jasmine and Karma test runner. These frameworks can be used to write unit tests for Ionic applications. Also, ionic-CLI provides live reload feature so the application can be tested in the browser. For example, the ionic serve command can be used to load the application in any browser. Thus, we can use Chrome Developer Tools or Mozilla Firefox with Firebug to debug and inspect Ionic applications.

    14. Question 14. Performance Of Ionic Application Is Bad On Older Android Devices. Why Is This, And What Can Be Done To Improve It?

      Answer :

      Ionic framework uses the default web browser available for the device to run its hybrid application. Older versions of Android devices (4.0-4.3) use Android’s default browser, which has significantly less performance and standards compliance than the modern Chrome browser.

      One way to resolve this issue is to use crosswalk along with Ionic framework. Crosswalk allows you to package a modern Chrome webview along with Ionic application, so an application does not have to rely on native Android browser. The end results are much better performances and modern web API across all Android versions.

    15. Question 15. What’s The Difference Between “ionic Build” And “ionic Prepare”?

      Answer :

      ionic prepare <platform> copies all files from the www folder into the target platform’s www folder.

      ionic build <platform> also does this, but also builds the app’s source code so that it can be run on a simulator/emulator or a device.

    16. Question 16. How Are Hybrid Apps Different From Building Native Apps And Mobile Websites?

      Answer :

      Native Mobile Apps:

      An application program developed for use on a specific platform or device is basically a Native mobile application. Since native apps are developed by using a particular platform, they can take advantage of the device specific software and hardware. That means- they can use inbuilt software and programs like – global positioning system (GPS) and camera. One of the best parts of native applications is that they are faster and specific to platforms like Android and iOS etc.

      They are usually developed by the use of integrated development environment (IDE). IDEs are best known tools for providing services like- project development, building debugging, version control and many others. However, iOS and Android applications are generated by using different languages and IDEs, there’s a lot of similarity in the techniques and the development environment. So, exploring the differences of the two languages is not a pre requisite. By simply using the tools required by the devices, programmers can develop native apps, which are at times difficult to develop.

      Mobile Web Apps:

      Web apps are actually not real applications; they are really websites. Their look and feel is like native applications, but they are not implemented in a similar way as native apps are implemented. They run through a browser and are typically written in HTML5. Mobile web apps can be accessed normally as users access any web page. To install the app, users are needed to navigate to a special URL and there they get the option of “installing” the app on their home screen by creating a bookmark to that page.

      Basically, web apps became popular when HTML5 came and people realized that they can get native like functionality in the browser. Nowadays, when more and more websites use HTML5, the difference between web apps and regular web pages has become blurry.

      Hybrid Mobile Apps:

      Hybrid apps are actually developed using a combination of the native and HTML5-based web features. An HTML5 mobile app is basically a web page, or chain of web pages, that are developed to run on a small screen. Hybrid development unites the best and leaves the worst points of both the native and HTML5 platforms. Hybrid app can also be called as a web app, which is initially developed using HTML5 and JavaScript and then it is wrapped in a lean native container that makes it accessible to native platform features as well.

      Apart, from being a bit slow platform in accessing NFC, Bluetooth, etc and requires a third party plug-in, hybrid platform has handful of advantages. A hybrid application has a potential to develop applications using Android, Windows and Blackberry in spite of the factor that each of the platform requires different development environment, language and framework.

      To get a prominent presence in the app store without spending significant effort for developing a different app, companies develop hybrid apps as wrappers for an existing web page. Moreover, hybrid apps are also popular because they allow cross-platform development. That means, developers can reuse the same HTML code components on different mobile operating systems, which in turn, reduces significantly the development costs. Tools like PhoneGap and Sencha Touch allow users to design and code across platforms, using the power of HTML.

    17. Question 17. What Is Ionic Framework?

      Answer :

      Ionic is a Cordova or Phonegap based framework that allows you to build cross-platform applications for android, ios and windows or basically any other platform that Phonegap supports. It is 100% free and open source project, licensed under MIT.Ionic allows developers to build beautiful and interactive mobile application using HTML5 and AngularJS. Ionic supports over 120 native device features like Bluetooth, Health Kit, Finger Print Auth, and more with Cordova/Phonegap plugins and TypeScript extensions.

    18. Question 18. Ionic Framework Developed By Whom?

      Answer :

      Ionic was developed by Max Lynch, Ben Sperry, and Adam Bradley of Drifty co. It was developed in 2013. It is open source software which is used for hybrid mobile app development. It is built on Angular JS and Apache Cordova. Ionic is a collection of Angular.js, UI Router, Angular directive, Angular services, JS utilities, and mobile-focused CSS styles.

    19. Question 19. How To Get The Installed Version Of The Ionic Framework?

      Answer :

      You can get installed version of Ionic framework by running ionic.version in console of your web browser.

    20. Question 20. What Is The Difference Between Ionic Polymerization And Free-radical?

      Answer :

      A chain of polymerization where active centers are ions is known as ionic polymerization. The ions may be anions or cations.

      In free-radical polymerization, the building blocks are the free radicals which form polymer chains.

    21. Question 21. List Some Popular Apps Built With Ionic Framework?

      Answer :

      Here goes a list of some popular applications built with the help of ionic framework: –

      • Pacifica: Cognitive Behavioural Therapy.
      • TD Trading: Stock Trading App.
      • Sworkit: Workout and Fitness Plan.
      • Market Watch: Stock Market and Business News.
      • Chef Steps: Cooking Tutorials and Tool.
      • Nationwide: Insurance and Financial Services.
      • Just Watch: Streaming Search Engine.
      • Untapped: Social Discovery and Check-in Network.
      • National Museum of African American History and Culture.
      • Crypto change: Crypto currency Tracker.

    22. Question 22. How To Use Service/providers In Ionic?

      Answer :

      Services play an important role in Ionic framework as they provide information to our application and perform various tasks for us. Connectivity Monitor, Simple Alert, data, Google Maps, etc. are some of the services which are built in ionic framework. There are few concepts which are to be kept in mind while creating a service. Importing a service, adding a provider to it, and injecting it are the most important thing. The services should be imported in the classes where they are to be used. When it is injected inside a constructor, a new member variable is created which can be accessed from anywhere within the class. A provider can be added in a service by two ways. Either it can be added to an individual component, or it can be added globally to the application when bootstrapping the root component.

    23. Question 23. How Many Types Of Storage Available In Ionic Framework?

      Answer :

      The easy way to store key or values and JSON objects is known as storage in Ionic Framework. In this various storage, engines are used. While on the web application, the storage will tend to use IndexedDB, WebSQL, and local storage. Various types of storage are available in ionic framework. Some of them are –

      • HTML5 local storage
      • Cookie and session storage
      • IndexedDB
      • WebSQL
      • PouchDB
      • Web service/api storage
      • Cordova storage.

    24. Question 24. List Some Advantages And Disadvantages Of Ionic Framework?

      Answer :

      Everything has some pros and cons.

      Some advantages and disadvantages of ionic framework are listed below:–

      Advantages:

      • All the supported platforms have only one source. Mainly they are android and OSX.
      • It is mainly developed in HTML, CSS, and JS. Almost all the developers are familiar with these languages.
      • Most importantly, angular is being used which is by default embedded in the ionic framework.
      • It is completely free and is considered as one of the best open-source software for developing hybrid mobile applications.

      Disadvantages:

      • There is a performance gap between the ionic and the native applications. Ionic apps are not as fast as the native apps.
      • Ionic applications may not be as secure as the native applications.
      • The ionic applications may lack in some native functions. In such case, plugins have to be developed.

    25. Question 25. What Are The New Features Included In Ionic2?

      Answer :

      There is a reason why Ionic2 framework is better than the Ionic1 framework. Here are some features which were included in the ionic2 framework when it was being developed.

      1. Ionic2 framework consists of classes unlike ionic1 which has controllers.
      2. In ionic2, every component has its own folder and its own class file.
      3. In ionic2, you can automatically generate pages, providers, tabs, pipes, components, and directives.
      4. In this, more native approach is used for navigation.
      5. Ionic2 is just plain old JavaScript.

    26. Question 26. What Is The Current Stable Version Of Ionic Framework?

      Answer :

      Ionic currently requires Angular JS in order to work as its full potential. The current stable version of the ionic framework is ionic 3.0. It was released on 24th February, 2017. It helps you build native-feeling mobile applications using web technologies. It mainly focuses on the look and feel, and the user interface of your application.

    27. Question 27. How To Use Observables In Ionic Framework?

      Answer :

      Observables are something that are not specific to Ionic or Angular and are provided by the RxJS library. Observables are almost similar to the promises but can do a lot more. It can deal with multiple values at a time rather than just resolving one value. You can even subscribe to an observable to manipulate the data which is associated with it. Observables are considered to be “lazy”, i.e. they won’t get executed until and unless they are subscribed to. Various operations can be applied to the observables for modifying it and returning a new one. You can even create your own observable. The observable patterns are combined into one with the help of subject which is preferred for simple implementations.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Ionic Tutorial