A Feedback App in Minutes With Ionic and Cloudant

DZone 's Guide to

A Feedback App in Minutes With Ionic and Cloudant

Perfect for meetups and the like, you can create your own feedback app with the open source Ionic and the DBaaS Cloudant that works on iOS and Android.

· Mobile Zone ·
Free Resource

An Ionic feedback app using Cloudant NoSQL service on IBM Bluemix is an easy-to-configure mobile app for receiving feedback at meetups, events, etc.,

Ionic is a complete open-source SDK for hybrid mobile app development. Built on top of AngularJS and Apache Cordova, Ionic provides tools and services for developing hybrid mobile apps using web technologies like CSS, HTML5, and SASS.

Cloudant is a distributed database as a service (DBaaS) built from the ground up to deliver fast-growing application data to the edge.

The app runs on iOS and Android and is built using Ionic Version 1.7.13.


Image title

Image title


Creating a Cloudant NoSQL DB Service on IBM Bluemix

  • Don’t have Bluemix account? Sign up to create a free trial account.
  • Have a Bluemix account? Use this link.

Add a new Cloudant data service in just a few clicks:

  1. Visit your Bluemix dashboard.
  2. Click Catalog.
  3. On the left pane, click on Data & Analytics under Services.
  4. Click the Cloudant NoSQL DB tile.
  5. Enter a unique, descriptive name in the Service name field.
  6. Check Features, Images, and Pricing Plans.
  7. Click the Create button.

Cloudant Dashboard 2.0

Once the Cloudant service is created:

  • Click the LAUNCH button to launch the Cloudant Dashboard 2.0 (powerful querying, analytics, replication, and syncing happens here) in a separate tab:
  • Create a new database by clicking on Create Database on the top ribbon. Your database is created.
  • From the left pane, click on Account -> CORS Tab -> Check All domains ( * ).

*Not recommended for all use cases, but with this being a simple mobile app, we're taking this liberty. Check the CORS documentation for more info.

Configuring the Ionic App With a Configuration File

Install Ionic:

npm install -g cordova ionic@1.7.13

Clone the repo:

  • Open the unzipped folder in an IDE (I use Brackets) of your choice and navigate to the www/js folder.
  • Create a new JavaScript file — app.config. With the extension, the file will be app.config.js
  • Paste the below code in app.config.js:
  • DBName: Name of the Cloudant NoSQL DB you created within Dashboard 2.0.
  • For hostname, username, and password: Navigate to the Cloudant Service page on Bluemix and click the Service Credentials tab.
  • Click on View Credentials under Actions. We're looking at Placeholder Cloudant Service

The CLOUDANTDB_CONFIG constant values are utilized in controllers.js

Customize the App UI

  • Images can be replaced with the same name under the img folder.
  • Customize the feedback fields in feedback.html.
  • There are validations on the fields based on the type. For example, email checks for an @ in the entry. Submit will be disabled until the form is completely valid.

Testing the App

Desktop browser testing:

$ ionic serve

On an iOS Simulator or Android Emulator:

Note: Follow the Android and iOS platform guides to install required tools for development.


hybrid mobile apps ,cloudant ,ionic ,mobile ,tutorial

Published at DZone with permission of Vidyasagar Machupalli , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}