 <pre><code>angular .module('app', []) .controller('Ctrl', function() { this.tags = [ { name: 'bob' }, { name: 'rick' }, { name: 'dave' } ]; }) &lt;body ng-controller="Ctrl as vm"&gt; &lt;ul&gt; &lt;li ng-repeat="obj in vm.tags" ng-class="{'active': vm.active == obj.name}"&gt; &lt;a ng-click="vm.active = obj.name"&gt;{{obj.name}}&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; {{vm.active}} &lt;/body&gt; </code></pre> <p><a href="https://plnkr.co/edit/wvKIUtJIb0AE1vpWDtv9?p=preview" rel="nofollow">https://plnkr.co/edit/wvKIUtJIb0AE1vpWDtv9?p=preview</a></p>