I'm co-developing a login system UI in an angular app and I would like the sign-up and log-in menus to appear depending on a button press. I could do this in the controller with a .on method, but apparently that's bad practice in terms of using angular properly.
My code is as follows (cut out unnecessary bits):
<section ng-model="login" ng-init="login=true"> <section ng-if="login"> LOGIN CONTENT <button ng-click="login = !login">Sign up for an account</button> </section> <section ng-if="!login"> SIGN UP CONTENT </section> </section> I've no clue what I'm doing wrong, or if this is even the proper angular way of doing it.