One of my pages in Angular are going to need a step based approach.
The changing steps is working fine, however the model is not updated (it should be updated and stay unmodified when changing steps)
What am I doing wrong?
Here's my template
<div id="step2" ng-if="step == 2">Here is the second page</div>
<div class="step" ng-click="setStep(1)">1</div>
<div class="step" ng-click="setStep(2)">2</div>
The angularjs
script
$scope.name = "This is the name model";
$scope.step = 1;
$scope.setStep = function (step) {
$scope.step = step;
}
And finally a JSFiddle with the reproduced problem: http://jsfiddle.net/cmSDg/