How ion-view works?


#1

Hi All,

I am a new to AngularJs and Ionic. I would like to know the following,

  1. How ion-view works ?

  2. How do I change the color of the header ( like changing from bar-stable to bar-assertive ) ?

This code was auto generated by ion-view. How do I change bar-stable to bar-assertive ?

  1. What are all the configuration options available ?

  2. How to remove the “Back” text in the view backbutton ?

Eg,

<ion-nav-back-button class="button-clear button back-button disable-user-behavior">
<i class="icon ion-chevron-left"></i>
Back
</ion-nav-back-button>

I do tried to use hideBackButton=“true” it simply hides the ion-nav-back-button.

<ion-view title="My view name"hideBackButton="true" >

This code was generated by the ion-view. The auto generated code, already have ion-chevron-left icon. So I don’t need the “Back” text. So How do I remove this ?

Kindly help me on this.

Thanks in advance.


#2

i would like to know it can anyone answer this question ?


#3

do some searching yet i can’t find any related information for ion-view, can anyone answers this question ?
your help is appreciated thanks !


#4

Can’t customize it (or I just couldn’t find a way to yet) But what you could do is overwrite it.

So you want your own header

indent preformatted text by 4 spaces

<ion-view title="some title">
      <ion-content>
          // your stuff
      </ion-content>
</ion-view>

Change to this

indent preformatted text by 4 spaces

<ion-view title="some title"> 
    <ion-nav-bar class="bar-positive">/* add button etc*/</ion-nav-bar>
   <ion-content>
           /* you stuff */
   </ion-content>
 </ion-view>