Thursday, March 25, 2021

IONIC BASIC SETUP

 Before you start to install ionic, make sure you computer have node js and npm. Click here to download node js.

After that open your cmd and download ionic using npm. Make sure to open directory where you install the nodejs that contain npm.


$ npm install -g @ionic/cli



After you have install ionic, open a directory where you want to keep your project in cmd. Then run the script below. This script need to run everytime you want to create a new project.


ionic start

- select js framework. exp : angular

- name your project. exp : myapp

- select template. exp : blank


You have done created your project !!! Then open your project directory to open serve to preview project.


ionic serve

- after serve is running, you can view in browser or you can open in vs code.

- ctrl + shift + p > search ionic preview (in vscode)



To add new page for your app, open project directory and run :


ionic g page 'page name'  remove ''

or

ionic g




cmd script summary ...


npm install -g @ionic/cli

ionic start

ionic serve

ionic g page 'page name'  remove ''

ionic g


No comments:

Post a Comment

IONIC PASS PARAMETER

 To pass parameter to next page, first we need to make sure that we have 2 pages which is page from and page to. In page from ts file, you h...