AngularJS Example

HTML

<div ng-app="App">
  <div ng-controller="MyCtrl">
      <ul>
          <li ng-repeat="tmp in list" ng-class="{active: $last}" ng-switch="$last">
                <span ng-switch-when="true">{{tmp.text}}</span>
                <a href="#{{tmp.url}}" ng-switch-default>{{tmp.text}}</a>
            </li>
      </ul>
  </div>
</div>

CSS

</style> <!-- Ugly Hack to make remote files preload in jsFiddle --> 
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.min.js"></script>
<style>

JavaScript

angular.module('App', [])
    .controller('MyCtrl', function($scope) {
        $scope.list = [{
            url: 'http://google.com',
            text: 'google.com'
        }, {
            url: 'http://yahoo.com',
            text: 'yahoo.com'
        }, {
            url: 'http://binq.com',
            text: 'binq.com'
        }]
    });