Book Image

Ionic Cookbook

By : Hoc Phan
Book Image

Ionic Cookbook

By: Hoc Phan

Overview of this book

Table of Contents (18 chapters)
Ionic Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Customizing the app folder structure


The structure in starter templates may not be good enough depending on the app. It's important to understand its folder structure to allow further customization. Since the Ionic project is based on Cordova, most of what you see will be either iOS or Android related. This is the breakdown of what is inside the folder:

platforms/ (specific built code for iOS, Android, or Windows phone)

lib/

plugins/ (Cordova plugins)

ionic/ (CSS, fonts, JS, and SCSS from Ionic)

scss/

templates/ (UI-router templates)

ionic.app.scss (your app's custom Sass file)

index.html (main file)

www/

bower.json

css/ (your own css)

gulpfile.js

style.css (processed CSS file that will automatically be generated)

config.xml

img/ (your own images)

ionic.project

js/

package.json

How to do it...

All application logic customization should be done in the /www folder as index.html is the bootstrap template. If you add in more JavaScript modules, you can put them in the /www/js/lib folder.

There is no need to modify the /platforms or /plugins folders manually unless troubleshooting needs to be done. Otherwise, the ionic or cordova CLI will automate the content inside those folders.