Ionic directives and services
Ionic has components that are purely CSS-driven and it has components that need the magic of JavaScript to make them complete. Since Ionic uses AngularJS as its JavaScript framework, all reusable user interface components will be written in the form of directives and all reusable pieces of JavaScript functionality will be written in the form of services.
A few examples of Ionic directives are as follows:
- Navigation (
ion-nav-view
) - Content (
ion-content
,ion-pane
andion-refresher
) - Headers and Footers (
ion-header-bar
andion-footer-bar
) - Lists (
ion-list
andion-item
) - Tabs (
ion-tabs
andion-tab
) - Side menu (
ion-side-menus
andion-side-menu
)
A few examples of Ionic services are as follows:
- Platform (
$ionicPlatform
) - Scroll (
$ionicScrollDelegate
) - Modals (
$ionicModal
) - Navbar (
$ionicNavBarDelegate
) - History (
$ionicHistory
) - Popup (
$ionicPopup
)
In the next section of the chapter, we will be going through some of the Ionic directives and services and understanding how to work with them...