There is clearly something fundamental but I can't search any other useful posts on this.
For first case, it worked as expected. When click on button B, I am getting 2. For second case, it is not working anymore when I changed the numbers to A&B. Please find the code as below.
First Case
<p>Click the button:</p>
<button ng-click="name = 1" ng_init="name=0">A</button>
<button ng-click="name = 2" ng_init="name=0">B</button>
<p>This is {{name}}.</p>
Second Case
<p>Click the button:</p>
<button ng-click="name = A" ng_init="name=0">A</button>
<button ng-click="name = B" ng_init="name=0">B</button>
<p>This is {{name}}.</p>