Learning Ionic
上QQ阅读APP看书,第一时间看更新

Preface

Build mobile hybrid applications with ease using Ionic. Be it simple apps that integrate REST API endpoints or complicated apps that involve native features, Ionic provides a simple API to work with them.

With a basic knowledge of HTML, CSS, and a decent knowledge of AngularJS, one can easily convert a million-dollar idea into an app with a few lines of code.

In this book, we will explore how you can do this.

What this book covers

Chapter 1, Ionic – Powered by AngularJS, introduces you to the power of AngularJS. This is why it is considered a good framework for a hybrid framework, such as Ionic.

Chapter 2, Welcome to Ionic, talks about the Mobile Hybrid framework: Cordova. It shows how Ionic fits into the bigger picture. This chapter also shows you how to install the required software for the development of the Ionic framework.

Chapter 3, Ionic CSS Components and Navigation, tells you how to use Ionic as a CSS framework for your mobile web applications. This chapter also talks about how to integrate Ionic CSS only components with AngularJS, apart from routing in Ionic apps.

Chapter 4, Ionic and SCSS, explores how to theme Ionic apps with the help of built-in SCSS support.

Chapter 5, Ionic Directives and Services, provides information on how to use Ionic's built-in directives and services, which helps to quickly bring your application to life.

Chapter 6, Building a Bookstore App, deals with how you can leverage the knowledge you have gained so far in building an Ionic client for a secured REST API. This chapter walks you through the itsy-bitsy pieces that are needed to develop Ionic apps that will simply consume REST API endpoints.

Chapter 7, Cordova and ngCordova, talks about how you can easily integrate device features, such as camera and Bluetooth, with the help of Cordova and ngCordova in your Ionic apps.

Chapter 8, Building a Messaging App, shows you how you can use all the knowledge that you have gained so far to build a messaging app, where users can register, log in, and chat with each other and share pictures and locations.

Chapter 9, Releasing the Ionic App, focuses on how to generate installers for the apps that you have built with Cordova and Ionic using the Ionic CLI and the PhoneGap build.

Appendix, Additional Topics and Tips, discusses how to efficiently use the Ionic CLI and Ionic cloud services to build, deploy, and manage your Ionic applications.

What you need for this book

To start building Ionic apps, you need to have a basic knowledge of HTML, CSS, JavaScript, and AngularJS. A good knowledge of mobile application development, device native features, and Cordova is preferred.

You will need Node.js, Cordova CLI, and Ionic CLI installed to work with Ionic. If you are planning to add theming support and other third-party libraries, you will need Git and Bower. If you want to work with device features, such as camera or Bluetooth, you need to have their mobile OS set up on your machine.

Who this book is for

This book is intended for those who want to learn how to build hybrid mobile applications using Ionic. It is also ideal for people who want to work with theming Ionic apps, integrating with the REST API, and learning more about device features, such as camera or Bluetooth, using ngCordova.

Prior knowledge of AngularJS is essential to complete this book successfully.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "It wraps setTimeInterval() and returns a promise when you register this service."

A block of code is set as follows:

myApp.controller('logCtrl', ['$log', function($log) {
        
    $log.log('Log Ctrl Initialized');
        
    }]);

Any command-line input or output is written as follows:

# ionic server –l -c

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "In the popup, you will notice that the Login button uses the positive class for styling."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. You can access the code, raise issues, chat with the author, and clear your queries at GitHub (https://github.com/learning-ionic).

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: http://www.packtpub.com/sites/default/files/downloads/2603OS_ColoredImages.pdf

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.