I'm having a bizarre problem with a variable I created in HTML itself with AngularJS. I even tried to instantiate it on the Controller to see if that was the problem but no.
I have a button that in ng-click
I say that this variable (which has not yet been instantiated) becomes the opposite of it. For the button works. It comes with null
first, but clicking the button a few times it gains value and becomes True
or False
(depending on the click). I display this variable inside the button and it works. Now if I try to use it elsewhere, it does not work.
<button type="button" ng-click="nova_variavel_criada = !nova_variavel_criada;">{$nova_variavel_criada$} . {$nova_variavel_criada ? 'PRIMEIRO CASO':'SEGUNDO CASO'$}</button>
AQUI ELA NÃO PRINTA NENHUM RESULTADO: {$nova_variavel_criada$}
About {$ $}
is because I use Django and had to change the keys.
Within the button, clicking changes the phrase normally. Even the back print appears "TRUE" and "FALSE" according to Click. The problem is outside the button, nothing appears.