title: changing model objects inside controllers to manipulate DOM - angular js- Best practices?
body: <p>I hava a simple question after reading the post below and working for some time now on angular js.</p>
  
  <p>the post  : <a href="http://docs.angularjs.org/guide/controller">no dom manipulation from angular js controllers </a></p>
  
  <p>the concerned point (from the post) : <strong>Do not use controllers to<br>
  Manipulate DOM — Controllers should contain only business logic. Putting any presentation logic into Controllers significantly affects its testability. Angular has databinding for most cases and directives to encapsulate manual DOM manipulation.</strong></p>
  
  <hr>
  
  <p>the question : if I have a simple angular app and on a button click i am calling a function of my controller. In that function I want to do some simple business logic and depending on that business logic output i want to hide/show a button.</p>
  
  <p><strong>What is the best possible way to do it.</strong></p>
  
  <p>My current way of doing this is : <a href="http://plnkr.co/edit/bdzNLe5iuQezncuxBkuu?p=preview">PLUNKER EXAMPLE</a>
  (does this way of doing stuff breaks the law in the angular js realm. is that against testing?
  please correct me)</p>