app.controller('AController', function($scope, $http) { // here you can use $scope.URL which is the actual site from JavaScript's location.href $scope.views = ['a', 'b', 'c']; });