The Ionic project structure
So far, we have scaffolded a blank Ionic app and launched it in a browser. Now, we will walk through the scaffolded project structure.
If we open the chapter2 example1
folder in our text editor, we should see the following folder structure at the root of the project:
. ├── config.xml ├── hooks ├── ionic.config.json ├── node_modules ├── package.json ├── platforms ├── plugins ├── resources ├── src ├── tsconfig.json ├── tslint.json ├── www
Here is a quick explanation of each of the items:
src
: This is the folder where all the development happens. The app source code will be placed here. If you are coming from Ionic 1 to Ionic 2, this is the first change you would notice. For me, this is a very good upgrade to the folder structure, as it keeps the development code separate from the deployment code.hooks
: This folder consists of scripts that get executed when a particular Cordova task is performed. A Cordova task can be any of the following:after_platform_add...