title: How to make a On/Off button in Ionic
body: <p>I need to put a button in Ionic that stays activated after it's been pressed, and only deactivates after it's been pressed again.</p>
  
  <p>There is a similar question but it only applies to icon buttons. (<a href="https://stackoverflow.com/questions/29841253/how-to-adding-navigation-bar-button-having-ionic-on-ionic-off-functionality">How to adding navigation bar button having ionic-on/ ionic-off functionality</a>).</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I can't use a toggle button, it is required to be a regular looking buttom (in this case an Ionic button-outline) that stays active when pressed.</p>
  
  <p>Here is some code:</p>
  
  <pre><code>&lt;div class="botones"&gt;
      &lt;div class="row"&gt;
        &lt;div class="col"&gt;
          &lt;button class="button button-outline button-block button-positive"&gt;
            Promociones
          &lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="col"&gt;
          &lt;button class="button button-outline button-block button-energized" &gt;
            Aprobados
          &lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="col"&gt;
          &lt;button class="button button-outline button-block button-assertive" &gt;
            Alerta
          &lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="col"&gt;
          &lt;button class="button button-outline button-block button-balanced" &gt;
            ATM
          &lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>As you can see is a simple horizontal array of buttons. They suppose to act as filters for a message inbox, so they have to stay pressed (one at the time at most) as the filter is active. Like a tab but not quite.</p>
  
  <p>The main question is, how can I access the activated state of the button so I can mantain it activated.</p>