Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ionic 2 Cookbook

You're reading from   Ionic 2 Cookbook The rich flavors of Ionic at your disposal

Arrow left icon
Product type Paperback
Published in Nov 2016
Publisher Packt
ISBN-13 9781786465962
Length 320 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Hoc Phan Hoc Phan
Author Profile Icon Hoc Phan
Hoc Phan
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Creating Our First App with Ionic 2 FREE CHAPTER 2. Adding Ionic 2 Components 3. Extending Ionic 2 with Angular 2 Building Blocks 4. Validating Forms and Making HTTP Requests 5. Adding Animation 6. User Authentication and Push Notification Using Ionic Cloud 7. Supporting Device Functionalities Using Ionic Native 8. Theming the App 9. Publishing the App for Different Platforms Index

Introduction

Most of Ionic's out-of-the-box features are actually prebuilt components. In this section, you will learn how to create your own custom component using the html template, which contains Ionic components as well.

Components actually define Angular 2. A component is no more than just a class with self-describing features. For example, <ul> is a component that you are already familiar with. Previously, you used various Ionic components, such as <ion-list> and <ion-item>. A component is a decorator (that is, @Component) to add metadata to a class to describe the following:

  • selector: This is the name that is to be used in the DOM (for example, <my-component>)
  • template or templateUrl: This refers to the way the component is rendered
  • directives: This refers to a list of directive dependencies you plan to use inside the component
  • providers: This is a list of providers (that is, services) you plan to use inside the component

Of course, there are many other options...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime