title: Is it possible to set switch button to true via function?
body: <p>i got an switch button in my HTML part.It uses "checked ng-click",
   "ng-modal" and uses the css class "switch" from <a href="https://material.angularjs.org/latest/demo/switch" rel="nofollow noreferrer">https://material.angularjs.org/latest/demo/switch</a></p>
  
  <p>So my problem is i ve got a function at my Controller, which needs to change the button from false to true. 
  For the logic it works by setting the ng-modal to true, but i still need to get the button set as true in view. 
  Is there a way to do this? 
  Something like "set ng-click as true" or something? </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;span style='float: right;' class='hidden-print'&gt;
      &lt;span class='roundButtonsInProject' style='color: white'&gt;dynamische Ansicht&lt;/span&gt;
      &lt;label class='switch'&gt;
          &lt;input checked ng-click="idler()" ng-model='dynamicView' type='checkbox'&gt;
          &lt;span class='slider round'&gt;&lt;/span&gt;
      &lt;/label&gt;
  &lt;/span&gt;
  </code></pre>
  
  
  
  <p>So i just need the button act like being clicked</p>
  
  <p>Thanks in advance</p>