CSS
{{myStyle}}
JS
$scope.myStyle = 0;
function changeColor(){
$scope.myStyle++
}
I link the changeColor()
to ngclick but the {{myColor}}
is not changing. When I make the function self-execute, then it changes. I assumed it would work similar to ng-model
. What could be causing this problem?