Is it possible to set switch button to true via function?

i got an switch button in my HTML part.It uses “checked ng-click”,
“ng-modal” and uses the css class “switch” from https://material.angularjs.org/latest/demo/switch

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?

<span style='float: right;' class='hidden-print'>
    <span class='roundButtonsInProject' style='color: white'>dynamische Ansicht</span>
    <label class='switch'>
        <input checked ng-click="idler()" ng-model='dynamicView' type='checkbox'>
        <span class='slider round'></span>
    </label>
</span>

So i just need the button act like being clicked

Thanks in advance

Source: New feed
Source Url Is it possible to set switch button to true via function?