Book Image

Learning Node.js for Mobile Application Development

Book Image

Learning Node.js for Mobile Application Development

Overview of this book

Table of Contents (21 chapters)
Learning Node.js for Mobile Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
14
Creating an E-Commerce Application Using the Ionic Framework
Index

Adding a new tab


In this project, we would like to add a new tab that highlights the developers of this application. This will inform the potential users of this app about how to get in touch with the developers to provide them with the necessary feedback to improve the app experience.

In order to achieve this, we'll need to perform the following four main steps:

  1. Create a new controller entry in controllers.js.

  2. Create a new tab controller called tab-about in HTML.

  3. Add a new tab entry in the tabs.html file.

  4. Consolidate our work in the app.js file and connect everything together.

Creating a new controller

Let's start with adding a controller for the new tab. Head over to controllers.js and add the following into it:

controller('AboutCtrl', function($scope) {})

Don't worry about the empty function for now. At the moment, our tab does not need any functionality apart from simply appearing.

Creating a view

Now that we have a controller, we need to implement the view for the new tab. The first order of business...