title: Angularjs - Making a button behave like a checkbox
body: <p>Im trying to make ngstyle give an interface a list view for the users easily and have encountered an issue someone may be able to assist with.</p>
  
  <p>I am trying to use ngstyle and ngmodel to both alter the style and hide icons when a button is clicked, ideally I would like a button that allow you to switch between list and tile view modes.</p>
  
  <p>Here is the checkbox system as it stands (which is clunky and not user friendly, but works).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;p style="color:black; font-size:14px; margin-left:50px;" class="label"&gt;List View
        &lt;input type="checkbox" ng-model="visible" aria-label="Toggle ngShow" style="margin-left:5px;" ng-click="myStyle={width:'100%', height:'30px', 'text-align':'left', top:'7px', 'font-size':'14px'}"&gt;
      &lt;/p&gt;
      &lt;p style="color:black; font-size:14px;" class="label"&gt;Tile View
        &lt;input type="button" ng-model="unchecked" aria-label="Toggle ngShow" style="margin-left:5px;" ng-click="myStyle={}"&gt;
      &lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And here is what ive done to the icons so they hide when checked:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>  .hideItem {
      visibility: hidden;
    }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;i ng-class="{'hideItem': visible}" class="icon fa fa-bookmark-o"&gt;&lt;/i&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>What I need is for preferably a single button that is "Change View" which accomplishes the same task Im achieving here but easier.</p>
  
  <p>Any assistance or ideas would be greatly appreciated.</p>
  
  <p>Mant thanks in advance</p>