Hello Ionic framework - a sample hydrib mobile application.
Ionic Framework as the website says is the top open source framework for building amazing mobile apps..
I’ve written a sample 3 page mobile app that can be deployed into iOS and android.
Here is how to use it and code is hosted at https://github.com/rrmerugu/hello-ionic.
Step1: Create ionic app
ionic start hello_app --v2 sidemenuStep2: Create new page
ionic g page homeStep3: Configuring the pages in the app
- Add new page
homeinsrc/app/app.module.ts - Import and add
homeinsrc/app/app.components.ts - Pages of the app is located in
src/app/app.components.tswith variable inthis.pages - Change the index/root page of the app in
src/app/app.components.tswith the variablerootPage. Change therootPagevariable accordingly. - SideMenu template can be found at
src/app/app.html
- Add new page
Generating a build for
iOSionic build ios. App is generated inhello-ionic/hello_app/platforms/ios/build/emulator/hello_app.appSimulating the generating build using
ionic emulate ios
Other commands
ionic platformsto check the available platformsionic platform add androidto add android platform
Publishing
- Remove any
pluginsthat you used for development but not needed for production. Example:cordova plugin rm cordova-plugin-console - Creating a production build -
ionic build ios --release
References:
- Anatomy of Code : https://ionicframework.com/docs/v2/setup/tutorial/project-structure/
- Generate page : https://ionicframework.com/docs/v2/cli/generate/
- Create to Deployment Guide : https://ionicframework.com/docs/guide/
- Publishing in android and iOS: https://ionicframework.com/docs/guide/publishing.html
Try it out. All the very best :)
Last modified on 2017-02-03
