Here are the steps:
Step 1: Open Git Bash

Now create your project, here we are creating our project with the name Test. The default directory where it will save is C:\Users\shubhamk\Test


After completion we can check if our project is in its default directory.

Now open your project to code in Visual Studio Code,


Now open index.html placed inside the www directory. It will be the default page of our application. Now run the project but first go to the directory Test using command,
$ cd Test
And then run

Now create your project, here we are creating our project with the name Test. The default directory where it will save is C:\Users\shubhamk\Test


After completion we can check if our project is in its default directory.

Now open your project to code in Visual Studio Code,


Now open index.html placed inside the www directory. It will be the default page of our application. Now run the project but first go to the directory Test using command,
$ cd Test
And then run
$ ionic serve

To stop the running ionic app use ionic $ q - it will stop the project.
Now we are going to use CSS components in our project which “Ionic Framework official website" states are as follows.
CSS Component - Header
Header is the region at the top of a screen that can contain various types of content. In Ionic we can create headers with a different look & feel, below we are going to discuss most of them are available. Here we are going to change in code of index.html and for every change we only need to change <ion-header-bar> classes.
Index.html
- <body ng-app="starter">
- <ion-pane>
- <ion-header-bar class="bar-light">
- <h1 class="title">Ionic Header With bar-light</h1>
- </ion-header-bar>
- <ion-content>
- </ion-content>
- </ion-pane>
- </body>

In above code we created a Header bar by using a class in its bar-light. This class will apply a light color theme on the Header. For different color theme we only need to change in class as given below:
bar-stable
- <ion-header-bar class="bar-stable">
- <h1 class="title">Ionic Header With bar-stable</h1>
- </ion-header-bar>

bar-positive

Bar-calm

Bar-balanced

bar-energized

bar-assertive

bar-royal

bar-dark

Sub Header
This bar can be placed below the original header bar. Like Header bar here also we can change the class to change the color theme specifying the type of bar.
- <body ng-app="starter">
- <ion-pane>
- <ion-header-bar class="bar-positive">
- <h1 class="title">Ionic Header With bar-dark</h1>
- </ion-header-bar>
- <ion-header-bar class="bar bar-subheader bar-calm">
- <h2 class="title">Sub Header</h2>
- </ion-header-bar>
- <ion-content>
- </ion-content>
- </ion-pane>
- </body>

In above code inside the <ion-header-bar> we provided three different class, there 1st class is bar which is to create a bar only, after that we used 2nd class bar-subheader which is placing this bar to the below of Original Header bar and after that 3rd class is applied for color theme.
CSS- Component- Footer
As Headers, Footers are regions at the bottom of a screen that can contain various types of content. Footers have the same color options like Header.
- <body ng-app="starter">
- <ion-pane>
- <ion-header-bar class="bar-positive">
- <h1 class="title">Ionic Header</h1>
- </ion-header-bar>
- <ion-header-bar class="bar bar-subheader bar-calm">
- <h2 class="title">Sub Header</h2>
- </ion-header-bar>
- <ion-content>
- </ion-content>
- <ion-footer-bar class="bar-assertive">
- <button class="button button-clear">Left</button>
- <h1 class="title">Ionic Footer</h1>
- <button class="button button-clear">Right</button>
- </ion-footer-bar>
- </ion-pane>
- </body>








Kuppurasu NagarajPosted Apr 25, 2016, 11:55 AM
Nice Sharing
Vignesh ManiPosted Apr 25, 2016, 8:17 AM
Nice