Today, I have seen a bug in angularjs:
When you try to set a scope value directly in a ng-click, it doesn\'t work when your ng-click is in a ng-if which test the same sc
ng-if creates its own scope, which can complicate things.
Changing ng-if to ng-show should solve the problem.